Ruby is the New Smalltalk

January 28, 2012

Over the past few months, I have had the opportunity to use the Ruby language on a small project.

Ruby was designed by Yukihiro “Matz” Matsumoto as an fully object-oriented, dynamically typed, interpreted language. Its design was influenced by Perl, Smalltalk, and Python.

What surprised me was the degree to which the language reminded me of Smalltalk – everything is an object and there are many familiar Smalltalk methods such as “select” and “collect” for collections.

All of the consulting work that I have done over the past decade has been for Internet applications with an emphasis on RIA (rich Internet application) architectures (ie with large amounts of JavaScript).

This usually involves considerable manipulation of data structures such as dictionaries and lists. And Ruby is very powerful in this area with an easy syntax for declaring literal structures ([…] for lists and {…} for dictionaries.

The Ruby environment that I use is on the Heroku cloud platform. Heroku, recently hired “Matz”, the inventor of Ruby, as a full-time member of their staff.

Twenty years ago, I used to build Smalltalk applications for Unix desktop workstations. There were many flavors of workstation popular at the time and Smalltalk offered a single solution to run on all platforms. With the current dominance of Windows and MacIntosh, the requirement for multi-platform desktop apps has mostly disappeared.

Today’s application environment is increasing becoming Internet based where standard protocols (HTTP,HTML,CSS,JavaScript,etc) mostly hide the specifics of client devices.

The client-side application language seems to be standardizing on JavaScript. So, our language choices come down to what works best on the server.

And, as I said earlier, Ruby is a descendant of Smalltalk which has excellent server-side implementations. My sense of Ruby is that it is about 80% influenced by Smalltalk, and perhaps 10% each by Python and Perl.

So, I think that one of the main reasons that we have not seen, and IMHO may never see, a Smalltalk revival is that its “ecological niche” is now occupied by Ruby.

The development environment so beloved by Smalltalkers (with browsers, inspectors, debuggers, etc) really had very little to do with the Smalltalk language itself but had more to do with the single-user desktop platform which Smalltalk was designed for.

On a desktop platform, you can halt a process to inspect its internal state. Internet applications running on a shared server hundreds or thousands of kilometers away are a totally different situation.

“Smalltalk-like” tools can probably be developed for many of the popular modern languages such as Python, Ruby, Clojure, Scala, or Groovy.

And maybe even for PHP…

Advertisements