[squeak-dev] Ideas about sets and dictionaries

Eliot Miranda eliot.miranda at gmail.com
Wed Nov 11 23:20:25 UTC 2009


On Wed, Nov 11, 2009 at 3:14 PM, Russell N Hyer <
hrothgar.ofstingan at gmail.com> wrote:

> I still don't comprehend the purpose behind having more than one
> flavour of empty in regards to empty set based mathematics.
>

nil is an object like any other, and Sets can contain arbitrary objects.
An empty Set contains no objects.  The fact that internally an empty Set has
some slots intialized to nil is an implementation detail that in no way
implies that it contains nil.

So if sets are capable of including arbitrary objects they should be able to
contain nil.  There are lots of contexts in which having collections that
can include nil is useful.  The compiler is one.  Storing and reconstituting
object graphs is another.

Or in summary nil ~~ #isEmpty.

HTH
Eliot

>
> 2009/11/11, Igor Stasenko <siguctua at gmail.com>:
> > Just want to add that enabling a set to contain nils already discussed
> > before.
> >
> >
> http://n4.nabble.com/squeak-dev-Letting-Set-contain-nils-td69437.html#a69437
> >
> > ... and as you may guess, i supporting Levente in this :)
> >
> > --
> > Best regards,
> > Igor Stasenko AKA sig.
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20091111/ba4cc880/attachment.htm


More information about the Squeak-dev mailing list