About {} and its limits

Bert Freudenberg bert at impara.de
Thu Feb 10 17:10:26 UTC 2005


Am 10.02.2005 um 17:31 schrieb stéphane ducasse:
>> eat :)
>>
>> Two things I spotted:
>>
>> * I'd rather call "super printOn:" in Array if it's neither literal 
>> nor self-evaluating
>> * printAsSelfEvaluatingFormOn: would look nicer using do:separatedBy:
>
> Indeed shame on us :)
> But I like that you like it because I think that this is best 
> compromise we can get to offer
> self-evaluation when we can.
>
> Stef
>
> Alex can you fix that and resubmit the changeset

And while you're at it, there are a some more classes that are 
self-evaluating: Booleans, UndefinedObject, Associations, Intervals, 
Colors, RunArrays come to mind, maybe more.

Also, in Object it should default to

	^self isLiteral

so you could remove it in String, Number etc. (and you wouldn't forget 
nil, true, etc.).

In all other places like Rectangle it should be

	^self class == Rectangle

otherwise any subclass that is non-self-evaluating would break this.



- Bert -




More information about the Squeak-dev mailing list