If you’ll allow for some generalization, the mainstream programming language stack basically looks like this a stack.
Dynamic, interpreted languages at the top, nitty-gritty close-to-the-machine languages at the bottom. It hasn’t always been this way, of course, but that’s certainly been the stack for the last few years. Lately, though, something’s been changing. There’s a new layer on the stack.
Now we’ve got dynamic languages running on top of interpreted languages, and in some cases atop other dynamic languages. Some of these languages at the top of the stack have been in development for years, but my assertion is that 2008 will be the year that they see increased adoption across the industry.
Abstraction means increasing returns in developer productivity. Implementing a non-trivial language in C is a hellacious challenge; implementing it in a language like Java, apparently less so given the relatively rapid time-to-market of projects like JRuby. Environments like the Java Virtual Machine (JVM) and and Microsoft’s .NET Common Language Infrastructure (CLI) are written for performance and portability. Building on a powerful VM or runtime environment allows a language implementor to inherit some powerful traits.
If this trend of was only happening on the JVM and CLI it would be notable but hardly worth going on about. What made me take pause was the emergence of Nu and ruby+objc. Nu looks like Lisp, and ruby+objc will look like Ruby, but the goal is the same: build a language that gets the Objective-C runtime to do the dirty work and focus on a pleasurable syntax and higher-level abstractions. Implementing the language directly on the runtime has the added benefit of doing an end-run around the problems of bridging languages.
Portable runtimes are big engineering efforts, typically the province of the Suns, Microsofts, and Apples of the computing world. It’s understandable that big engineering shops would gear their runtimes towards industrial-strength languages like Java, C#, and Objective-C. But there are plenty of projects for which an industrial-strength language is an impediment, not a boon. Having access to a dynamic language on top of your favorite industrial-strength high-level language is an incredibly useful tool in a programmer’s toolbox.
Proving the Trend
Runtime-by-runtime, here’s a list of the languages at the top of the stack in 2008:
- Scala - “a general purpose programming language […], concise, elegant, and type-safe, […] smoothly integrates features of object-oriented and functional languages”
- JRuby - Ruby for Java
- Jython - Python for Java
- Groovy - “an agile and dynamic language for the Java Virtual Machine”
- so very many more
- Boo - “a new object oriented statically typed programming language”
- IronPython - Python on the.NET CLI
- IronRuby - Ruby on the .NET CLI
- F# - ML on the .NET CLI, “provides […] type safety, performance and scripting”
- really quite a few more, albeit not as many as on the JVM
Even more out there, here are languages implemented atop dynamic languages, some experimental, some practical:
- Puppet - a “simple declarative specification language […] written entirely in Ruby” for systems management. We’re using Puppet to manage our new cluster at Twitter.
- RLisp - a Lisp implemented in Ruby
- Bus Scheme - “a Scheme written in Ruby, but implemented on the bus!
- PyPy - Python implemented in Python (but it’s actually way more than that)
At any rate, something to watch in aught-eight. I’d be interested to hear if any of the above languages are on your radar.