[squeak-dev] Re: Sets with nil (Was: Ideas about sets and
dictionaries)
Bert Freudenberg
bert at freudenbergs.de
Thu Nov 12 11:58:30 UTC 2009
On 12.11.2009, at 12:49, radoslav hodnicak wrote:
>
> In all my time I've been programming in Smalltalk (since about 2000), the idea that Sets simply do not contain nil was a core assumption of using collection classes for me, not just an implementation detail. I routinely do "something asSet" to get rid of nils, and this change would break all my code.
(Array new: 5) asSet
raises an error in Squeak ...
> Now, I obvioulsy do not see the value of allowing Sets to contain nil, but other people do. How about creating a new class to handle this? NilSet or whatever
>
> rado
Not a bad suggestion. SetWithNil?
- Bert -
More information about the Squeak-dev
mailing list
|