[squeak-dev] Re: Letting Set contain nils?
tim Rowledge
tim at rowledge.org
Sat Aug 9 17:25:45 UTC 2008
When Sets are created the array holding the values is of course filled
with nils by the VM. Using any other object to signify 'this slot is
empty' would of course cost time to iterate over the array and fill
each slot. Then for every grow it would cost more time to fill the new
slots with this other distinguished value.
If you really, really, need a form of Set that can include nil as a
useful object (for want of a better word) then make a new SetWithNils
class or similar.
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Fractured Idiom:- AMICUS PURIAE - Platonic friend
More information about the Squeak-dev
mailing list
|