I like turtles

I read this post by Ramon Leon on why Smalltalk is a better environment for building DSLs than is Ruby (found via keith).

I generally agree with Ramon's points, in that the C-based MRI prevents us from reaching into the guts of the platform and making modifications without having to drop down a layer and do it all in C. And, of course, that's the point: if I want to make major modifications to the language I'm working in, I want to do it from that language. I don't want to drop to C – it is the moral equivalent of reaching for a glass of milk, taking a sip, and finding out it is orange juice. The orange juice isn't inherently evil, but in this context, it might as well be motor oil.

The problem I have with his post, and with most posts about X-vs.-Y language comparisons is that in conflates two ideas and reaches the wrong conclusion. Ramon is right: the MRI prevents Ruby programmers from being able to modify their own language to the extent that SmallTalkers can. However, there is nothing particular about Ruby the LANGUAGE that does.

For example, the Rubinius project will provide us a stack of turtles on which to perform linguistic gymnastics to our heart's content. If you read the collected writings of the Rubinius team, you'll see that they are in fact heavily influenced by the Smalltalk-80 architecture.

And I don't think Ramon is ignorant of this fact, or that he is maliciously overlooking it, just that his prose doesn't make the distinction explicit which might leave readers with less understanding of the Ruby ecosystem with the wrong idea. The same way that Ruby people often complain about Java and paint the language and the JVM with the same broad brush.

Get In Touch