Fear and loathing of the "perification" of Smalltalk

Peter William Lount peter at smalltalk.org
Tue Sep 4 23:34:14 UTC 2007


Damien Pollet wrote:
> On 05/09/07, Andreas Raab <andreas.raab at gmx.de> wrote:
>   
>> Damien Pollet wrote:
>>     
>>> (*) just on this point I'd prefer to write something like
>>> {[a]. [:x| x b]. [:x | x c]} valueAsChain
>>>       
>> Nah. I want to write:
>>
>>    [a. b. c] piped.
>>     
>
> OK, but then please don't call [...] a block. Now it's an expression
> sequence, a parse tree, or whatever, but not a closure (or a very
> specific one)
>   
It remains a closure even if it's also a statement sequence, a parse
tree or whatever. Why wouldn't it?

The key is in how it's evaluated. With a block that can be chosen at run
time whereas with the curly braces it's much more limited since they
just syntax sugar and don't have the power of the capabilities of the block.

> If [a.b.c] piped is possible, then [a.b.c] do: [:aStatement|
> aStatement value] should be possible to, shouldn't it ?
> Or [a.b.c] addStatement: [d]
> or [a.b.c] at: 2 put: [e]
>
>   
Yes, those are nice additions. Now blocks do become more mailable like
lisp code. ;--) Glad to see people with their thinking caps on! Glad to
finally see others getting it.

Cheers,

Peter





More information about the Squeak-dev mailing list