nil or #nil?

Dana Anthony daanth at unx.sas.com
Tue Aug 25 19:25:49 UTC 1998


Dwight Hughes wrote:
> 
> David N. Smith wrote:
> >
> > I agree that self is not a literal, but I'm not so sure about nil, true,
> > and false.
> > So, what is a literal anyway?
> 
> In this light, nil, true, and false are literals - but so are #nil,
> #true, and #false -- the problem right now is that nil ~~ #nil, true ~~
> #true, and false ~~ #false, which is a bit counterintuitive. Would it
> outrage anyone to consider nil, true and false to be syntactic sugar for
> #nil, #true, and #false?
> 
> -- Dwight

You bet people would be outraged.
Mainly because of a simple fact:  #nil, #true, and #false are instances
of Symbol.

nil is an instance of UndefinedObject; true is of True and false of
False.

How can a symbol be == to an undefinedObject or a boolean?  It cannot.

That's just not object oriented :) :)

-- 
Dana Lynne Goldblatt Anthony
Internet Publications Technology at SAS Institute
World Headquarters Cary, NC, USA





More information about the Squeak-dev mailing list