[self-interest] Nil

Douglas Atique datique at alcatel.com.br
Mon Jul 5 12:42:12 UTC 1999

Remember that discussion on the usefulness of nil and the default
initialization of slots? I was reading the Self 4.0 Programmer┬┤s
Reference Manual this weekend and thought a little bit more about the
purpose of nil. If I got the idea, nil should not be used as a default
initializer, instead a specific object should be created to mean "no
object here" in the particular context. Well, perhaps (I don't remember
if anyone said this) nil could be used as a prototype of this kind of
object, or a traits, so that the common behavior of all "null" objects
would be concentrated on it.
Is it already so?
I understand that nil is one object, and as such it has one type. So if
one uses it to represent "no object" in places where different types are
being represented, then one is losing type information. If we create
other objects to play this role, so that nil is their parent, or so that
they are cloned from nil, perhaps we can keep the commonality of the nil
"family" and also keep different nil's for different "types".
Did I get the idea, folks?
Do I make a point?



eGroups.com home: http://www.egroups.com/group/self-interest
http://www.egroups.com - Simplifying group communications

More information about the Self-interest mailing list