The rantings of a beautiful mind

On life, society, and computer technology.

My Photo
Name:
Location: Toronto, Ontario, Canada

I live in the Fortress of Solitude. I drive the Silver Beast. My obsession is justice. I used to be a Windows software developer. I retired in 2000 when my stock options helped me achieve financial security.

Wednesday, October 18, 2006

An Ode to Smalltalk

I found this post on the Internet. I thought it was very elegant and insightful, so I just had to show it to you guys. When you read it, keep in mind how you do things in C# or Java...


Smalltalk may very well be the one true language of civilization and progress (and yes, I need medical help).

It is not, however, the language of the future. :( It's more of a half-forgotten treasure, alight with the lost wisdom of the ancients (also see Symbolics, Lisp Machines, Eiffel, or Project Orion).

There are those that sit and lament the decline of a superior, more enlightened technology, lost to the barbarian hordes of the latter days (more like to the lack of management and advertising competence by its owners). (Don't even think about starting on the VHS vs. Betamax thing, tho. This is different).

There are those that ask, "Why is it that we do not yet hold in our hot little consumer hands, computer technology that was developed decades ago?"

That way lies certain doom! Instead, keep the light of knowledge alive, all ye true believers! Teach your children, educate your co-workers, and scribe the legends of a long-forgotten age so that one day the technology can be resurrected. Rejoice in seeing the wisdom of the old ways run in the veins of its offsprings (Objective-C, Java, Ruby, Python,...).

Its time shall come again!

[Note: This is not to imply that Smalltalk is dead. Saying that would certainly be news to the vibrant Smalltalk community, or to the various Smalltalk vendors such as Instantiations (VA Smalltalk) or Cincom (VisualWorks, ObjectStudio), and certainly to the many companies who use Smalltalk as their primary development environment that are doing quite well. However, Smalltalk's place in the industry today is a far cry from the Xerox PARC's Project Dynabook days and the dreams of its inventor.]

Ahem. I suppose that, among all of this ranting, I have not mentioned what Smalltalk is at its heart, nor explained its uniqueness.

Smalltalk, as others have mentioned, is an Object-Oriented Programming Language. That fact alone is not enough for me to waste electrons on -- there are several things one has to understand about Smalltalk.

Purity and Simplicity of Syntax
Each line of Smalltalk code is like a string of pearls -- object message, object message message. That's it, that's all there is to the language. When I code, I can almost picture the objects as small orbs on the mindscape, with messages as pulses of light traveling between the orbs in a vast, delicate network. I can't make any claims of productivity gains solely due to the Smalltalk syntax. I can say, however, that it's a simple, intuitive joy to code in this language.

Smalltalk is the IDE
This may seem strange to many C++ or Java coders who are used to the command-line compiler, and regard an IDE as little more than a souped-up text editor for the lazy. Those who swear by, and cannot live without, their MS Visual Studio or JBuilder environments can start to appreciate the importance of a good IDE to a language; however, the symbiosis between Smalltalk, the language, and its IDE goes even beyond that.

For one, a class browser in a typical Smalltalk IDE is a feat of informational organization. A single screen lists all the known objects, their methods (either instance or class methods by the flick of a switch), the variables used by that class, and finally the source code for a particular selected method. This setup allows the programmer to traverse the complex informational space of a large software project with amazing speed. For instance, if you click on a variable, all the methods that refer to that variable show up. More importantly, for a given method, you can see all its senders (other methods that call this one), as well as its implementers (for a commonly named method, think Java's toString(), a list of objects who implement that method). Thus, following the execution path/crumb trail of (somebody else's) code, across dozens of objects becomes almost effortless. Finally, there's the...

Live Brain Surgery Effect
Smalltalk's virtual machine is its greatest strength; the fact that it's a byte-code based interpreted language enables a programmer to delve right into the code of a program while it's running. Like a doctor performing a brain surgery without anaesthetic, with the patient awake and coherent and able to answer questions, a Smalltalk programmer can look and probe at a living, running program at any moment, and examine the contents of every variable in every method on the callstack. So say your program gets an error. Instead of deciphering the cryptic error messages, hunting for the mistake through the source code, recompiling and restarting the program... a window pops up. The window puts you directly into the call stack at the moment of the error, and you can examine the living guts (suspended in time) of the program -- the values of all the variables in the methods on the stack; you can even execute code on the objects in those methods. And when you track down the error and change code in a method, only the code in that method is recompiled, while the program is still running! At that point, you can close the error window, and continue with the (still uninterrupted) program, but now with the correct code.


Sweet F*cking Jesus!!! Isn’t that amazing??? Why the hell aren’t we all programming in Smalltalk...?

1 Comments:

Blogger Darkest Knight said...

Y’know, my very first programming language was FORTRAN (in the early 1980’s, I was a bona fide FORTRAN guru). I have a very special place in my heart for Fortran (these days, the name is no longer all capitalized). Maybe I should return to my roots. I miss working with this language. (Is there a Visual Fortran??)


I find myself inexorably drawn to Lisp. This really is an amazing language (even if I don’t fully understand it). But all those parentheses drive me crazy!


Over the years, I’ve dabbled in Ada, Edison, Forth, Modula-2, Oberon, Occam, Pascal, Scheme, Turing. I liked Edison a lot because it was such a simple language. Back in the late 1980’s, I was sold on the idea of simple programming languages by Edison’s creator, Per Brinch Hansen. Ever since then, I’ve been obsessed with simple languages.

For a biography of my computer science hero, Per Brinch Hansen, visit:

http://web.syr.edu/~pbhansen/html/biography.html

For interesting trivia about Brinch Hansen (in particular, look at “Illustrations”), go to:

http://brinch-hansen.net/

3:21 PM  

Post a Comment

<< Home