Pure Danger Tech



02 Jan 2008

I normally am not a big fan of writing blogs that just point and nod but I just read Ola Bini’s post on language explorations and I’m pointing and nodding emphatically.

Through all the Java 7 stuff and the back and forth on closures and a few little experiences lately with Jython, Scala, and Groovy this stuff has all been jangling around in my head. Lots of people like to dump on Java but I just don’t see Java going away for a long time, or really ever. It’s too embedded and ingrained in enterprises and operational systems of too many big companies to go away. The shift from the last generation to Java was amazingly fast, but still took a decade or so.

And yet undoubtedly, Java is more verbose and less powerful than, well pretty much all of the languages being advocated today. There’s lots of things to love about these other languages and it’s no shocker that people are searching for new and better ways of doing things.

The thing that crystallized it for me in Ola’s post was the way he categorizes what’s happening into layers and I can see that as something that happens gradually. Operationally, as long as stuff is startable, monitorable, etc in a JVM as expected, it’s feasible to start bleeding either statically compiled languages like Scala or dynamically typed languages like JRuby, Jython, Groovy, etc into the mix now.

This is a perfect opportunity for alternating hard and soft layers, which makes parts of your architecture rigid and parts of it very flexible. The key is to build hard static layers in things that won’t change much and soft flexible layers where you expect lots of change.

I think the DSL layer is another interesting trend right now and we’re still at the early part of a slow, deep wave for DSLs. Long-time readers of this blog know I’ve been interested in DSLs for quite a while and I’ve built a few with Antlr and JavaCC myself. I’ve had great success in particular with building internal DSLs for testing my own code. I think there are lots of subdomains in any reasonable sized project where DSLs can be the right solution.

So, I’m with Ola – long live polyglotism around a JVM core! Let’s use ’em all when the time is right.