Strongtalk VM for Squeak

Ramon Leon ramon.leon at allresnet.com
Tue Sep 19 16:33:38 UTC 2006


> Smalltalk is a more consistent environment whereas Lisp is a more  
> consistent language:
> Experiments like evolutionary programming done by Hillis crossing  
> over lisp trees with a restricted vocabulary would be quite hard to  
> do in Smalltalk.
> Yet I prefer my tweakable browsers over a tweakable emacs...

Same here, Lisp pays for it's power by not being able to have the tools
Smalltalk has.

> Btw., Paul's example for the conciseness of Lisp vs other languages  
> (including Smalltalk) is a but spoiled:
> ==========
> As an illustration of what I mean about the relative power of  
> programming languages, consider the following problem. We want to  
> write a function that generates accumulators-- a function that takes  
> a number n, and returns a function that takes another number i and  
> returns n incremented by i.
> 
> (That's incremented by, not plus. An accumulator has to accumulate.)
> 
> In Common Lisp this would be
> (defun foo (n)
>    (lambda (i) (incf n i)))
> 
> (...)
> 
> foo: n
>    |s|
>    s := n.
>    ^[:i| s := s+i. ]
> because although in general lexical variables work, you can't do an  
> assignment to a parameter, so you have to create a new variable s.

Or cheat..

foo: n 
    n in: [:it | ^[:i | it := it + i]]





More information about the Squeak-dev mailing list