Tuesday, August 28, 2007


I have been spending a great deal of my time lately thinking about scripting issues. Most people are a bit wary of diving into Smalltalk to get things done. Of course, it is really a marvelous scripting language in many ways, but people tend to find it a bit difficult. I think the reason for this is the same reason Lisp is a bit difficult. Both Smalltalk and Lisp have extremely regular syntax structure. In Smalltalk, even the traditional control structures (if/then, while, for) are just normal object messages that look the same as any other object messages. Most other languages have "exceptional" syntax, in that they have a number of reserved key words, and often have specific non-regular syntax to support these "exceptions". This makes it easier to visually parse, as most developers also tend to format their code around this non-regular syntax. This is especially useful to new programmers, because they can use this as a way to understand the code they are looking at.

Smalltalk and Lisp programmer usually format their code in a way to hilight the flow of control as well, but since every line of code starts with an actual object followed by a message, even this is still harder to immediately recognize.

Scratch is beautiful visual scripting language developed by the Lifelong Kindergarten group at MIT where they have moved very strongly in the direction of hilighting these very same control structures by using multiple shaped and colored tiles. What is nice about this is it makes it very easy to understand the structure of a program at a glance, and the program itself is simply "assembled" like you might put Lego blocks together. Interestingly, Scratch is built on top of Squeak - a version of Smalltalk.

We have been looking at a number of scripting languages over the past year, and have even integrated Python directly into Qwaq Forums. We are also looking very closely at Javascript and Lua. In particular, I love Lua, as it really gives me a lot of the capabilities I miss in Smalltalk - functions are first class objects and it has full closure support. This allows for some very interesting capabilities in code. I have been saying that I was thinking about building Wicket in Python in the past, but I believe Lua would be a much better choice.

1 comment:

luniki said...

So is there already a roadmap for integration of scripting into the Croquet SDK. Just having the Python integration from Qwaq Forums in the SDK would be so helpful for my thesis! And Lua would be certainly a dream :)

Are there concrete plans about this integration?