Fear and loathing of the "perification" of Smalltalk

Damien Pollet damien.pollet at gmail.com
Thu Sep 13 13:18:25 UTC 2007


On 13/09/2007, Igor Stasenko <siguctua at gmail.com> wrote:
> Suppose you sending #doInParralell message to some unknown block
> (which contents is unknown at compile time). It's very interesting
> what results will be.

Well, broken code breaks, where's the problem with that :)

My problem is that blocks will still be mostly used for sequential
code, callbacks, etc. Nothing indicates that a given block is or isn't
intended for parallel execution. I'd prefer to keep square bracket
blocks what they are now (lambdas) and use a different syntax for the
collection-of-statements blocks proposed by Peter (they should even be
collection-of-expressions rather than -of-statements)

As for macros, there are two points:

The metaprogramming job of macros is already done by the tools:
browser, refactorings, etc

Macros in Lisp use the same syntax as functions. When you look at a
Lisp expression, you can't know which evaluation rules apply without
looking at the library. Some s-exprs are syntax, evaluated at
compile-time, some other are calls evaluated at runtime. It works in
the Lisp realm, but it doesn't fit in Smalltalk. In Smalltalk,
parentheses mean "evaluated the usual way, once and now", square
brackets mean "evaluated the usual way, but it's not said when nor how
many times", and if we want "syntactic shortcut" then it should use a
separate notation.

-- 
Damien Pollet
type less, do more [ | ] http://typo.cdlm.fasmz.org



More information about the Squeak-dev mailing list