Some Self ideas

Marcel Weiher marcel at
Sat Jan 20 15:43:09 UTC 2001

> From: "Lex Spoon" <lex at>

> To be pedantic, this is precisely what the [] *does* mean in
> ifTrue:ifFalse: -- the code is packaged up and is possibly evaluated 
> later.

But, since this is objects we are talking about, shouldn't it really  
be:  this is an *object* that is to be evaluated later?   So the [ ]  
syntax is nothing but the 'adaptor' that turns a sequence of code  
into an object for later evaluation.  However, we can also specify  
objects directly by just writing their name.  So I don't see [] as  
the 'normal' case and [] as a special case, but [] as the special  
(though common) case of specifying a literal code object.

I think making this distinction:  'something that is evaluated' vs.   
'code produced by the Smalltalk compiler' is valuable, partly  
because I am currently working with objects that are evaluated much  
like code, but aren't code.  It also makes sense in that what can be  
used in a certain spot in Smalltalk should at best never be  
determined by what it *is*, but rather by what how it "acts*.

Just my 2 cents,


More information about the Squeak-dev mailing list