

Josh Bloch on the Future of Java - prog
http://www.infoq.com/news/2010/04/bloch_java_future

======
dkarl
Java the language is ripe for replacement. Java was a miracle. It was a safe,
decently-designed language (thanks to Gosling et al.) that PHBs weren't scared
of (thanks to Sun's marketing.) A decent language with modern libraries and no
segfaults that your boss will actually let you use is no longer the novelty it
once was. Now when people think "Java" they don't think "what a relief, no
more C." They compare it to Ruby and C#, which is a little bit tougher
standard.

------
nradov
As a heavy Java user it's really frustrating to see how little effort Sun
(Oracle) has been putting into maintaining the JDK tools. It seems like only
critical security bugs get fixed and everything else just languishes. I
submitted a new javac bug 10 days ago and, although it was confirmed fairly
quickly, it still hasn't even shown up on the public web site. Or look at Bug
ID: 5093723
<[http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5093723&#...</a>. It's
been open for <i>five years</i> with no fix. I would be willing to pay for a
fix but there doesn't even seem to be a way to do that.

------
ZeroGravitas
A BSD Java worked on by IBM, Oracle, Google, Apache etc together would be
interesting, but it's the politics that'll make or break it.

~~~
jaaron
That's basically what Apache Harmony is today.

~~~
ZeroGravitas
Really? What's Oracle's involvement?

------
strlen
> "I just want to remind people that many recent Java success stories are
> getting lost in all the gloom and doom. Among them are Google Collections,
> Guice, the JVM languages you referred to earlier, and Android"

Bloch should also highlight java.util.concurrent, which was his and Doug Lea's
own work, including upcoming Fork/Join framework (JSR166y):
<http://gee.cs.oswego.edu/dl/jsr166/dist/jsr166ydocs/>

People often overlook this strength. There are quite beautifully designed APIs
(built on fairly few primitives e.g., monitors and condition variables) around
the difficult problem of shared state concurrency (yet the Fork/Join APIs are
also used by the Actor implementation in Scala 2.8 and I believe other Actor
implementations).

------
CountHackulus
I find it interesting that IBM's JVM wasn't even mentioned in the article, yet
there's an ad for IBM at the bottom of the page.

~~~
matrix
I found it curious that they omitted J9 too. That said, I haven't kept up with
what IBM has being doing with it lately and I've always been under the
impression it is a closed project that isn't likely to influence the overall
direction of Java.

I wish Microsoft would make the CLR open source and OS agnostic. That would
make things really interesting.

~~~
rortian
Sadly, it's extremely hard to see that happening. Write once, run anywhere was
a basic attempt at undermining the importance of Microsoft; oddly, it seems to
have undermined differences in server OSes. CLR will always be a framework
that makes Windows important for basic business reasons.

------
ivenkys
Interesting , though i would be more interested in an in-depth article from
the thought-leaders of the community about "Future of the JVM".

------
davidwparker
"InfoQ: This is probably provable (one way or another), but do you suspect
that the JVM's use has decreased over all, or that Java proper has decreased
while Ruby/Scala /Jython /Groovy have taken up the slack?

Actually none of these languages make Tiobe's top 20. That doesn't mean they
aren't important or valuable; they are. But they aren't mainstream, yet. That
said, I'm absolutely thrilled by the amount of language research and design
going on these days. There are plenty of good ideas out there, and it's
marvelous that people are exploring them."

Josh is a bright guy and Java isn't the terrible language everyone may think
it to be (though it isn't my preferred language). Ruby is in the Tiobe top 20
though... good to see that he at least recognizes the good that's coming out
of other languages.

~~~
prog
I am eagerly waiting for JDK 7 with invokedynamic support. I will be good to
see the improvements it will bring to dynamic languages like Jython and JRuby.

I wonder if Oracle is going to be conservative or go all out and consider
features like tail calls.

~~~
strlen
I would very much like a very simple, basic, tail recursion to be available in
Java. Not tail call elimination in the same way as is specified by Scheme. It
doesn't even require the a JVM change, it can be done by the compiler: Scala
does this. You could use an annotation (@Tailrecursive) to verify that it
happens (or error out).

C does this with "-O2" (factorial is a bad example, unfortunately as there are
algorithms that are much more naturally defined in terms of tail recursion):

    
    
      long factorial_helper(int n, int acc)
      {
          if (n==1)
              return acc;
    
          return factorial_helper(n - 1, n * acc);
      }
    

becomes:

    
    
      factorial_helper:
      .LFB16:
          jmp .L8
          .p2align 4,,7
      .L6:
          imull   %edi, %esi
          subl    $1, %edi
      .L8:
          cmpl    $1, %edi
          jne .L6
          movslq  %esi,%rax
          ret
    

Looks very similar to what my own assembly would look like. Now with -O4 the
assembly becomes completely unrecognizable (which is why higher level
languages may be faster than lower level ones).

Continuations would be another improvement possible at language rather than VM
level, with same effect (allowing efficient _and_ elegant implementation of
some algorithms).

------
j_baker
It's refreshing to hear a point of view that isn't all doom and gloom about
Oracle's Sun acquisition.

------
mark_l_watson
Interesting comments from the guy who sets Java best practices for Google. I
do most of my work now in Ruby but the Java platform is still very relevant to
me because I can mix my libraries and other people's Java libraries with
JRuby/Scala/Clojure applications. I still use Java for AppEngine development
(BTW, but not JDO because of the hit of longer loading request times).

------
prog
Considering the focus and shift towards dynamic languages I would love to see
more adoption for the parrot VM. There is a lot of innovation there.

~~~
Silhouette
I'm not sure how much of that "focus and shift towards dynamic languages" is
real, though, and how much is just an illusion created by lots of animated
discussion between us geeks in blogs and on forums like this one.

Of course it's hard to judge the progress of a vast and fast-moving industry
like ours, but what data there is always suggests that tried-and-tested static
languages like C, Java, C++ and newer derivatives like C# and Objective-C
still represent the lion's share of development. A few dynamic languages like
Perl, Python and JavaScript have established themselves as mainstream and
command significant user bases as well.

However, while we _hear_ a lot about things like Clojure and Groovy because
they are new and potentially interesting, I see little evidence that many
people are actually using them yet. How much real innovation is coming out of
these younger languages and platforms is an open question, and it will
probably be a few more years before we know what their real contribution will
be.

~~~
ivenkys
"I see little evidence that many people are actually using them yet." - My
experience has been different , even in large Enterprise Java Shops you now
have a smattering of different languages on the JVM , albeit all hidden away.

This is primarily because the new languages all come as jar files so taking a
cursory glance the tendency is to say - oh that's another Java library , look
a little deeper and you find Groovy,Beanshell,JRuby, AspectJ,Scala, Clojure et
all, the main scaffolding is still in Java but the interesting parts are being
written in other languages.

~~~
dabent
"in large Enterprise Java Shops you now have a smattering of different
languages on the JVM , albeit all hidden away."

That's my take as well. I currently work in a J-A-V-A shop, but Python scripts
are working their way in and there's the knowledge that in 5 years, we may
need to look at creating our next generation of web applications in another
framework.

------
Rickasaurus
Unless they drop the yahoo toolbar or some other distro gets easy to install,
I don't think the JVM has much of a (long term) future at all.

------
c00p3r
I think Java should share the future with the Flash - they were already seen
their best days.

