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

Igor Stasenko siguctua at gmail.com
Sun Aug 10 15:24:50 UTC 2008


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.

>
> Lou
> -----------------------------------------------------------
> Louis LaBrunda
> Keystone Software Corp.
> SkypeMe callto://PhotonDemon
> mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list