More the verbosity and lack of power inside the Java language.  Java is a
very limiting language.  It's fairly easy to grasp its intermediate usage
(although there are some arcane corners to it).  Languages like JRuby, Scala
and Groovy have a lot more powerful constructs (and similarly, a  steeper
"intermediate" level understanding.  I'd argue that JavaScript ranks more
powerful than Java in terms of the ability to write an expressive API and
focus on business logic.

I recently wrote a 30 line Scala program (including scaladoc comments,
although I'm not sure why I bother) to pull up a hudson project website and
automatically download all artifacts from the latest succesful build.  This
is something I would not have contemplated trying in Java.  Most likely I
would have used Perl, Python or some kind of shell script.

Don't get me wrong, I still use java for a lot of my development, and I
believe java annotations (and libraries using them) to be the single biggest
feature in reducing boiler-plate in my daily development.  The issue is not
annotations, but other features that are handy.

Examples include:

  - Some form of mixin, prototype or multiple inheritance.
  - Improvements to Nesting Scopes (i.e. declare a helper method inside
another method that can be used later.  You can already do this with
classes).
  - type inference (I'd like java to remain static, as that is a big gain
when refactoring code!)
  - Operator Overloading -  Yes, this is not a bad thing.  In C++ there were
so many ways to do it wrong, but on the JVM most of those aren't problems so
much.  You can actually natively support XQuery like syntax on DOM objects
if you allow "operators"
  - Tail-Call optimization  -  Recursion can be useful, and I'd like for the
compiler to optimize it for me.  This way, I don't have to worry so much
when using it (or write code that is uglier).  Granted, this type of
recursion is only useful in specific situations (which I've been running
into more frequently now that I am aware of them).


I love the JVM, and think it's great.  Java still has a sweet spot, and I
hope to continue using it in that sweet spot.   However, the productivity
gain of using another language on top of Java is too hard to ignore at this
stage.  Think of when people starting going to languages on top of C.


- Josh


On Tue, May 5, 2009 at 9:37 PM, Alexey Zinger <[email protected]> wrote:

>
>
> This is gonna be about verbosity of generics, isn't it?
>
> Alexey
>
>
>
> --- On Tue, 5/5/09, Dave Watson <[email protected]> wrote:
>
> > From: Dave Watson <[email protected]>
> > Subject: [The Java Posse] Re: Java as API language, its days numbered?
> > To: "The Java Posse" <[email protected]>
> > Date: Tuesday, May 5, 2009, 9:10 PM
> > What does this mean, exactly? Can you elaborate more about
> > the 85% of
> > your code that is boilerplate?
> >
> > Not trying to argue, I'm just very puzzled by what this
> > might mean....
> >
> > On May 5, 5:27 pm, Viktor Klang
> > <[email protected]> wrote:
> > > Greetings posse,
> > >
> > > having spent more than half a decade writing API:s in
> > Java I feel that since
> > > Java 5 was introduced, more and more time has to be
> > spent writing
> > > boilerplate API code to try to save the API consumers
> > from jumping through
> > > hoops in order to get stuff done. Because we all want
> > easily consumable
> > > libraries, don't we?
> > >
> > > Having jumped onto the Scala bandwagon about 1½ years
> > ago I feel like the
> > > ratio of business end code of Java is appro 15% while
> > in Scala it's more
> > > like 65%
> > >
> > > <observation>You can most likely substitute
> > "Scala" in the text below with
> > > any non-Java JVM language</observation>
> > >
> > > With Scala getting more and more cleaner to be
> > consumed by Java code, isn't
> > > there plenty of good reasons to switch to Scala for
> > library code, while
> > > letting the application developers stay i Java-land?
> > >
> > > --
> > > Viktor Klang
> > > Known from the Internet
> >
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to