21st Century Smalltalk

February 28, 2007

Almost Smalltalk

Filed under: Lisp, Smalltalk Language — pfisk @ 8:14 pm

lisptest14
Vista Smalltalk Site

To run the above demo, open a Lisp workspace and execute “(@open ListDemo)” – you can open Vista Smalltalk in your browser here.

This test was designed to test event callbacks using Smalltalk-style messaging.
Here is part of the code (the full source is here):

(setq btn (@new Button))
(@label- btn “Selection One”)
(@addcallback-function- btn “click” (lambda() (@self ‘oneselected- lst)))
(@addchild- hb btn)

Of course this doesn’t look like Smalltalk – it looks like some weird kind of Lisp. But it is equivalent, semantically, to this Smalltalk code:

btn := Button new.
btn label: ‘Selection One’.
btn addcallback: ‘click’ function: [self oneselected: lst].
hb addchild: btn

The next step is to make a Lisp reader that can read Smalltalk source (not too difficult), and then rearrange the Smalltalk token stream into the “weird Lisp” format above using macros.

Smalltalk running in Flash is not that far away.

3 Comments »

  1. This is like being 6 again and waiting for Christmas! ;-)

    Comment by Andy Burnett — March 1, 2007 @ 5:25 pm

  2. That’s great…I had always advocated having multiple syntax choices for smalltalk….

    How about adding a syntax that allows if () {} etc without having to do obj.Message()

    That would be great to not have to choose between prefix and postfix (lisp and smalltalk) notation but also a more “C” like one…

    Bravo!
    Software Maestro

    Comment by Software Maestro — July 6, 2007 @ 11:47 pm

  3. pheromone trap pheromone wholesale define pheromone cat pheromone prednisone medication pletal side effects nexus pheromone dog pheromone pheromone synthetic

    Comment by prednisone medication — December 25, 2007 @ 4:58 am


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.