[squeak-dev] Re: Letting Set contain nils?
tim Rowledge
tim at rowledge.org
Sat Aug 9 00:37:47 UTC 2008
On 8-Aug-08, at 5:20 PM, Igor Stasenko wrote:
> 2008/8/9 Craig Latta <craig at netjam.org>:
>>
>> I'll ask the inevitable question... given that ability, what do
>> you
>> really want to do? :)
>>
>
> Some practicle usage: pick an arbitrary array and tell the number of
> _unique_ objects it contains, including nils, of course.
For Sets that is trivial without any need whatsoever to alter
anything. It is theSet size + 1 since all Sets will have at least one
nil. Unless of course some evil person messes up the growing protocol
for Sets.
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Variables won't; constants aren't.
More information about the Squeak-dev
mailing list
|