Smalltalk and Ruby

June 3rd, 2008

I’ve begun working my way through Kent Beck’s Smalltalk Best Practice Patterns. Unlike so many techincal books, SBPP packs a punch. In just fifty pages, I’ve experience several “ah-hah” moments; I feel as if my understading of Ruby has grown by an order of magnitude.

Ruby’s debt to Smalltalk is no secret. So much of what we love about Ruby - pure object orientation, the Enumerable module, closures, and the inject method - derives from a language twenty years its elder. Rubyists may have much to learn from Smalltalk.

This is especially true given that the Ruby literature, as it stands, consists mostly of syntax and language fundamentals. Books on design, style, and patterns in Ruby are few. In Smalltalk, they seem to abound.

In my relatively superficial survey of a site containing free Smalltalk books, I’ve discovered a significant repository of ideas on object-oriented design and programming.

This is understandable for a least a couple of reasons. Obviously, Smalltalk’s literature has had more time to mature. But perhaps more importantly, Smalltalk grew up in an age when OOP was not yet the dominant paradigm. Therefore, it would have been important to advocate for the OOP philosophy and coding style.

This advocacy is still important; hence, the continued appeal of Kent Beck’s SBPP. While the book may be ten years old, and the Smalltalk language somewhat beyond its prime, there’s much to be gleaned from this gem of a language and its literature.

One response

  1. Ramon Leon comments:

    Smalltalk is not beyond its prime and thanks to Ruby, its use is actually up; otherwise, good post. I’d be more interested in reading about some of those aha moments you had, as you have them.

Leave a comment