[squeak-dev] Re: Letting Set contain nils?

Jason Johnson jason.johnson.081 at gmail.com
Mon Aug 11 12:13:26 UTC 2008


On Sun, Aug 10, 2008 at 5:24 PM, Igor Stasenko <siguctua at gmail.com> wrote:
> 2008/8/10 Louis LaBrunda <Lou at keystone-software.com>:
>> Hi Igor,
>>
>> How about creating a new class called #MetaUndefinedObject or #MetaNil.  Stick
>> it between #Object and #UndefinedObject.  By definition it would never be used
>> as an object, it would only be used as a filler for collections like #Set,
>> indicating that no "real" object is present.
>>
>> This would allow nil to be used in sets and elsewhere and allow it to be placed
>> in a set from a database row where a column is null without changing other code.
>>
>> This would not solve the recursive collection problem but that could be solved
>> at it source.
>
> This is nothing better than current sets, because you allowing sets to
> contain nil, but at the same time disallow MetaNil instance to be
> included into a set as an element.
> My point is to make sets which can contain ANY object without discrimination.

He said explicitly that MetaNil wouldn't be an object, therefor no one
could try to put it in anything.  Think of something like "unbound" in
Lisp.  Of course this would likely be a huge change.



More information about the Squeak-dev mailing list