[squeak-dev] Letting Set contain nils?

Keith Hodges keith_hodges at yahoo.co.uk
Sat Aug 9 22:38:48 UTC 2008


>
> Could it be that you're possibly missing an abstraction here? why not 
> use a different object, specialized for your needs, to represent your 
> null value?
>
>     Giovanni
>
Because as mentioned before, the most typical use case/failure mode is 
due to the fact that....

anArray asSet

cannot be guaranteed to work for all arrays. The solution whereby a Set 
uses itself as a null-marker solves this problem completely.

The only reason for not doing this before was the supposed speed 
penalty, now that Eliot says this is irrelevant this "fix" should be 
retro fitted, or at least a candidate for spoon.

Keith




More information about the Squeak-dev mailing list