What to believe?

Bert Freudenberg bert at freudenbergs.de
Wed Jun 27 07:28:22 UTC 2007


On Jun 27, 2007, at 9:14 , Blake wrote:

> On Tue, 26 Jun 2007 23:54:39 -0700, Bert Freudenberg  
> <bert at freudenbergs.de> wrote:
>
>> "ifTrue: aBlock" is short-hand for "ifTrue: trueBlock ifFalse:  
>> []". The value of an empty block is nil by definition. That's why  
>> True and False must return nil in #ifFalse: and #ifTrue:,  
>> respectively.
>
> So, lint is in this case un-short-handing.

Right. As Andreas points out it is conceivable that some Smalltalk  
would redefine the meaning so this would be more portable, and it  
might be considered more readable because it spells out the other  
case explicitly, leaving no one to wonder about the return value.

- Bert -





More information about the Squeak-dev mailing list