Chronos is one of the many Smalltalk-related blogs syndicated on Planet Smalltalk

Discussion of the Essence# programming language, and related issues and technologies.

Blog Timezone: America/Los_Angeles [Winter: -0800 hhmm | Summer: -0700 hhmm] 
Your local time:  


Smalltalk Considered Fun

Jeffrey Massung, in his blog post Smalltalk: An Application Language, states that programming in Smalltalk is fun. Jeffrey has formed that opinion over the past few months: He started using Smalltalk for the first time in late August 2006, developing a 2D game engine in Smalltalk.

I've had the same opinion since November, 1985--partly for the same reasons that Jeffrey mentions:

This is what Smalltalk does for me. I only write the code that matters. If I need to rename a class, all references everywhere else in my sources are automatically updated for me. If I change a method name, a browser window opens allowing me to see every caller so that I promptly fix them. These are just two of many, many, many features, all possible thanks to the reflective nature of Smalltalk, due in no small part, to it's object-oriented approach to problem solving.
When it is implemented well (dare I say "properly?"), this paradigm doesn't just constitute another tool in the toolbox; it is the toolbox, from which everything else stems.

Since I started this endeavor to create a 2D game engine in Smalltalk, I've not once - wait, let me reiterate this - not once have I stopped, and started over again. I'm still working in the same image I started with in late August, 2006. All my designs began with prototypes (*cough* hacks *cough*) inside the main code base, and yet the code is clean. When they worked, it took minutes to reorganize and re-factor the code properly. And when they didn't, it took minutes to strip out bad code, and restore the old.

I've honestly never had more fun programming! Smalltalk has actually made programming more fun than it already was. It allows me to iterate the code so fast! The speed at which I can try an idea, see what's wrong, switch gears, or continue molding until it's right is so ridiculously fast, that it's fun. It's been stated that programming isn't fun. Problem solving and code design are fun. Programming in Smalltalk is just that - all the time. It's fun.

This is why it's common practice to warn those who are about to learn Smalltalk that they may no longer have much desire to ever use anything else.

Jeffrey notes that the reasons that Smalltalk is such fun, and that the programmer's tools are so powerful and enabling, is because Smalltalk is so pervasively dynamic, so pervasively reflexive, and so pervasively open. And that's all quite true. But there's yet other reasons why Smalltalk is so much fun, and why it's so powerful: Smalltalk is pervasively simple, pervasively uniform and consistent, and it's metalevel is completely symmetric with its base level.

Smalltalk has a very high degree of symmetry, compared to any "Algol-like" language with which most programmers would be familiar. LISP exhibits the same high degree of symmetry. Broken symmetries are what make other languages not so fun.

Here's the symmetry, the uniformity, the consistency and the simplicity, stated concisely: All values are objects, all behavior is mediated by sending messages, and nothing is done by syntax when it can instead be done by sending messages to objects.

Smalltalk's high degree of symmetry has proven to be far more important than any theoretical benefits that might be garnered by the use of static type checking, primitive data types, syntactic sugar, or any of the other autocratic, control-freak gegaws that commonly decorate the mainstream languages.

Programmers of the world, throw off your chains. Your favorite programming languages are too complex, and have too little symmetry. It's time for a "Copernican Revolution," where programmers recognize that the curly-braced languages are based on overly-complex "epicycles," and that there's a much simpler approach.

Static/late binding is not the center of the universe, and attempting to make it so is robbing you of the fun you could be having.


Anonymous said...

We'd definitely love to! It's just it's a bit of a rough transition to make...

Antonio said...

If I'd learned Smalltalk maybe a year earlier, I would probably have been all over it. But during that year, I learned to use vim. And then going to through the tortuous mouse-centric world that is the Smalltalk IDE was... Well... Torture.

Don't get me wrong, I love the language to death. It was thoroughly enjoyable, and I will be the first to admit that whatever stumbling errors were made were entirely my fault. But for now, I'll stick to Ruby, which, while it's very lacking in the syntactic uniformity and simplicity of Smalltalk, allows me to do many of the same things right in vim. I never really got into using all the refactoring tools and such provided with IDEs, so perhaps that's my problem. Nonetheless, it hurts me that in order to switch methods I have to reach for the mouse.

But, that's just me, and it's high praise for a language when the only problem you can find with it is `I'm reaching for my mouse a little too often' :-)