Despite the recent articles on Scheme / CGI, I’m still very interested in the Seaside web framework. I’ve worked through a couple of the tutorials up until the point at which I thought I was fairly comfortable. However, when I try to write my own app, I come unstuck right at the very beginning. I think I know why this is, and that is because my Smalltalk is far too weak. Seaside makes it easy to build a nice web-app, but you to have good enough Smalltalk to be able to implement your model.
One of the features that I found very interesting me when I started reading about Smalltalk was the extremely small number of keywords and the complete lack of precedence rules (amongst other things). This convinced me that I didn’t need to spend any effort in actually learning Smalltalk itself – I would be able to pick it up while learning Seaside. However, initially, the learning curve of Smalltalk is steeper, not shallower than other environments.
In most languages, you can learn the language, then the libraries and then start picking up the idioms and there is a fairly smooth progression. In Squeak, you have to learn the different editor windows and various ways of importing code into the image. The fact that loops and conditional is implemented in the libraries obviously doesn’t mean that you don’t need to learn about loops and conditionals. You just need to learn more of the libraries to get started than in other languages.
There are some excellent resources on learning Smalltalk the language plus the appropriate libraries of course. I chose the A Little Smalltalk book and am slowly making my way through it. My next plan is to start making a Smalltalk cheatsheet.
I suspect once you get going you will find this pretty easy. Much of what you are used to finding in the programming language in other languages is in the Smalltalk library, but the library is clean and well designed and very powerful.
The focus in Smalltalk is on iteration and control constructs that make ample use of passing lambda expressions (called Block expressions in Smalltalk) to methods. This is kind of neat, and it is just one of the programming styles available in lisp.
(map (lambda (item) (* 2 item)) numbers)
numbers collect: [ :item | item * 2 ]