[squeak-dev] Re: Sets with nil (Was: Ideas about sets and
dictionaries)
Bert Freudenberg
bert at freudenbergs.de
Thu Nov 12 14:19:08 UTC 2009
On 12.11.2009, at 14:30, Jecel Assumpcao Jr wrote:
> Levente Uzonyi wrote:
>>> Which message send would you save in
>>>
>>> ... == UnoccupiedSlot
>>>
>>
>> UnoccupiedSlot instance.
>> I wouldn't use a class, because I think we should be able create a set
>> with any classes in it.
>
> Indeed - I am sure there are several places in the image that deal with
> sets of all classes or all globals.
Good point.
> One example of a Smalltalk with a non nil object to mark empty slots in
> sets is Self, so it has been done before. On the other hand, Self
> doesn't use associations but instead implements dictionaries with two
> parallel arrays.
It has even been done in Squeak - see class WeakSet.
- Bert -
More information about the Squeak-dev
mailing list
|