Josh Bloch on the Future of Java
infoq.com
infoq.com
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).
I wish Microsoft would make the CLR open source and OS agnostic. That would make things really interesting.
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.
I wonder if Oracle is going to be conservative or go all out and consider features like tail calls.
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).
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.
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.
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.
Objective C is almost as old as C++, actually.