[Pharo-project] Set with nil

Bernat Romagosa tibabenfortlapalanca at gmail.com
Fri May 20 11:36:04 CEST 2011


On a dropdown menu where you can choose between 'apple' -> #apple, 'orange'
-> #orange or 'nothing' -> nil, for example :)

2011/5/20 Henrik Sperre Johansen <henrik.s.johansen at veloxit.no>

> On 20.05.2011 11:14, Mariano Martinez Peck wrote:
>
>> please please please I want that!
>>
>> I want to be able to do:
>>
>> aSet
>> add: 'mariano';
>> add: nil;
>> add: 'guille';
>> add: nil.
>>
>> aSet size -> 3
>>
>> aSet contains: nil  -> true
>>
>> aSet remove: nil.
>>
>> aSet contains: nil  -> false
>>
> It's not like I'm principaly against it, but... why?
> Other than treating all objects equally, I mean?
>
> I honestly can't come up with a single case where I'd want to put nil in a
> Set on purpose.
>
> Cheers,
> Henry
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20110520/bc13fc83/attachment.htm>


More information about the Pharo-project mailing list