Beyond Java - Bruce Tate [84]
For both languages, my biggest concern is concurrency support . After you see what Erlang and Gambit Scheme can do, you quickly conclude that the next big language has to have something like it. But the world's not going to wait around for a perfect solution. We're at a tipping point, and sometime in the next year or two, I think one language will rally enough support to be a phenomenon as big as C++, Perl, and Java were, perfect or not. My money's on Ruby at the moment.
Will Groovy be the next great language?
SY: I don't think so. I was hoping it'd be cool, since among the 10 or 15 halfway-decent JVM languages out there, Groovy seems to have the most hype, and that's important. Technically, it's lacking.
At first glance, Groovy appears to be doing a lot of cool things and making good design decisions. Sadly, it doesn't survive the second glance. The language is a sort of kitchen sink for features, with no coherent vision emerging. The design is more focused on shortcuts than on general expressiveness. There are some good features, but not enough of them.
Except for the marketing, Groovy's execution has been particularly bad. It's still among the slowest JVM languages, and every beta has had obvious showstopper bugs. There's no real documentation, and the language only just got a parser generator after two years. It feels amateurish.
Ruby
Of all the languages generating a buzz in the Java space, Ruby comes up the most frequently. The Java community invests passion in equal parts venom and bliss into the raging Java versus Ruby on Rails debate. This fervor interests me because Ruby, and Rails, get plenty of exposure within the Java community where more mature object-oriented languages like Python and Smalltalk do not. Exposure can translate to more exposure and more users. Developed in 1995, Ruby is relatively mature in calendar years, but it gained popularity first in Japan, and the worldwide community is just now starting to grow. Among the most promising contenders, Ruby has the interesting combination of being relatively mature and simultaneously undiscovered by the Java masses.
In favor
While Ruby doesn't have the support of something like Java, it does have pretty good commercial backing in Japan. It's got a healthy community, and awareness in the Java community. It's also got a good virtual machine. But the beauty of Ruby is primarily in the language. Ruby also tends to solve a few important problems very well:
Ruby makes metaprogramming feel natural. Reflection is easy, and you can move and change methods quickly. Ruby's modules let you mix in important capabilities without changing any source code.
Rails, the flagship Ruby framework, makes it easy to build web sites based on relational databases. In the past decade, no other application has been more important.
Web-based development with other innovative approaches is easy. Ruby has at least three exploratory projects related to continuation servers.
Ruby is extremely dynamic and extensible. You can literally hook into Ruby everywhere. You can replace the methods of a whole class or a single instance at runtime. Ruby developers often introduce methods that themselves introduce other methods and behavior. The net effect is a single hook that lets you add significant capabilities to a class or instance with very little syntax.
In my opinion, metaprogramming in some form will increasingly define modern programming. That's already happening in Java, with persistence engines like Hibernate, programming hooks like interceptors, programming models like aspect-oriented programming, and language extensions like annotations. To do metaprogramming effectively, you need to be able to extend a language to fit seamlessly within a domain. Languages that make this easy will move faster than languages that don't. Java limits the ways that you can extend a class, it makes you