Categories
Code

Elevating the art of language implementation

Wherein I ponder useful additions to the programmer’s lore

Suppose we can take the following statement as true:

Whether you use it or not, the state of the programming craft has been elevated by many of the ideas bundled in Ruby on Rails.

ActiveRecord in particular brought many ideas that made it easier for more people to program with a database. Whereas before most people thought in terms of mappings or extracting data from hashes, AR gave a more fluent and object-like notation to work with. Thus, more interesting applications were born.

Right now, good VM technology is limited to Sun and Microsoft, while Apple, Google and Mozilla are re-inventing it for their web browsers. Open source languages, mostly, lack this VM technology.

ActiveRecord improved the state of the programming craft by spreading ideas that make working with a database easier. Could a similar improvement in the programming craft be realized by diffusing the knowledge of how to implement a good VM through a library? Is this a worthwhile aspiration?

By Adam Keys

Telling a joke. Typing.

3 replies on “Elevating the art of language implementation”

ORMs have been around for a lot longer than AR and done a lot better. AR is an example of “good enough” winning in the marketplace. TopLink was widely considered the best (and most expensive) of the Java ORMs a decade ago. Free and open source have long since relegated it to large enterprises.

AR’s extremely lightweight configuration and heavy use of conventions are the big wins for it (and Rails in general).

I’ll grant anyone that AR is far from optimal on many axes. My main point is that it made lots of previously inaccessible ideas easy to digest, and put enough of those easily understood ideas under one roof. This led to 1) widespread cloning in other languages and 2) more people building better apps because they didn’t have to think about the database layer so much.

On the language implementations side, you currently have Hotspot, which is relatively easy to understand _how_ it goes fast, but damn near impossible for a mere mortal to replicate. There’s also OCaml, which compiles down to code that is even faster than Hotspot, but again, not reproducible by the average practicing programmer.

My hope is that some library or framework will come along, borrowing the best ideas from the implementations of Hotspot, Lua, V8, Squirrelfish Extreme, BEAM, et. al. and package them so that a programmer who is only slightly-more-clever-than-average can implement a respectably modern, performant language. Said library needn’t yield the most performant languages, but it should diffuse the core ideas of modern implementations.

Comments are closed.