[ANSI-Smalltalk] A list of interesting methods,
not present in the ANSI standard
Simon Kirk
ansismalltalk at simonkirk.com
Thu Mar 20 09:21:20 GMT 2008
And can I add that it's one of the most useful methods, I find. I use
it regularly.</delurk>
S
On 20 Mar 2008, at 08:27, John Dougan wrote:
>
> Ralph Johnson wrote:
>>> Object>>ifNil:
>>> Object>>ifNil:ifNotNil:
>>> Object>>ifNotNil:
>>> Object>>ifNotNil:ifNil:
>>>
>> These were widely used by the time the standard was written, but not
>> part of every image, and i imagine the committee decided that it
>> wasn't worth the effort to put them in the standard. However, I
>> don't
>> think they are controversial, either. Since then, they have become
>> even more widely used.
>>
> There actually is a minor controversy here as the VisualWorks
> version of these has the block for the ifNotNil: clauses take an
> optional argument. I discovered while porting a large-ish chunk of
> VW code to Squeak/Croquet that the Squeak version does not take the
> optional argument and it's a compiler change to make it do so as
> these methods are optimized out.
>
> I personally think the VW approach is bad style and a possible
> efficiency issue. I ended up implementing Squeak's version of the
> one argument ifNotNil: in VW, which is ifNotNilDo: .
>
> Cheers,
> -- John
>
> --
> John Dougan
> jdougan at acm.org
> _______________________________________________
> ANSI-Smalltalk mailing list
> ANSI-Smalltalk at lists.openskills.org
> http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openskills.org/pipermail/ansi-smalltalk/attachments/20080320/36f8dfc8/attachment.htm
More information about the ANSI-Smalltalk
mailing list