Re: What do we mean by "Identical" ?



"John Thingstad" <john.thingstad@xxxxxxxxx> writes:
> Also NIL is the ONLY object that does not inherit from T.

What do you mean?

An object may be an instance of a class.
A class may inherit from another class.

But unless we have an object model where the dichotomy between objects
and classes doesn't exist, an object doesn't inherit from another object.


That said in CL, T is a "class", and NIL is an instance of (a subclass
of) the class T:

(typep NIL 'T) --> T

#+clisp (clos::subclassp (find-class 'null) (find-class 't)) --> T


> So.. any expression that does not evaluate to nil is T in Lisp
> generalized boolean.

It is not T, it is true.


> (if 1 ..) gives the same result as (if 2 ...) or (if "hello" ...)
> Expressions on the form nil, T, some number, a string are called self
> evaluating.
> That is.. When 'called' during the parsing of the paramenters they
> return themselves.
> Also a function call (func ..) is T unless it returns nil.

Not T, true.


--
__Pascal Bourguignon__ http://www.informatimago.com/
Kitty like plastic.
Confuses for litter box.
Don't leave tarp around.
.



Relevant Pages

  • Re: delete-file & probe-file on directories
    ... PARSE-NAMESTRING was NIL and the string was *not* a syntactically valid logical pathname namestring so the parsing is presumably going to proceed with it's default parsing. ... do any of the existing Unix-based CLs actually support a notion of host other than for logical pathnames? ...
    (comp.lang.lisp)
  • Re: delete-file & probe-file on directories
    ... PARSE-NAMESTRING was NIL and the string was *not* a syntactically valid logical pathname namestring so the parsing is presumably going to proceed with it's default parsing. ... support a notion of host other than for logical pathnames? ...
    (comp.lang.lisp)