Aha! How to get rid of Blocks in Smalltalk.

Henrik Gedenryd Henrik.Gedenryd at lucs.lu.se
Fri Apr 21 07:43:15 UTC 2000


David Farber wrote:

> Let me know what you
> think. I, for one, am estatic; I've finally figured out why I've always
> been uncomfortable with blocks and how I can get rid of them! At least,
> until someone bursts my bubble. :)


I feel obliged ;-)

Congratulations, you have rediscovered lambda functions (of esp. Lisp fame):
more or less, nameless functions. Smalltalk blocks are essentially such
nameless functions.

Blocks are thus very similar to methods, however just *slightly* different,
which as you say is slightly annoying--do not feel discouraged, you are not
the only one to have found blocks uncomfortable, Alan Kay and Peter Deutsch
have also written about this.

What I wonder is, however, why blocks weren't made equivalent to nameless
functions (or vice versa) in the first place.

(Rule of Squeak Innovation: Everytime someone suggests an improvement,
someone will reply "we did that in Smalltalk-72". Just wait and see...)

Henrik






More information about the Squeak-dev mailing list