[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A simple question



    Date: Thu, 23 Apr 87 15:54 EDT
    From: David C. Plummer <DCP@QUABBIN.SCRC.Symbolics.COM>
    Page 73 says several things.  It says NULL returns true if the argument
    is ().  To me at least, this implies NULL is used for flow/predicate and
    not for value.  It goes on to say that NULL is the same as NOT.  NOT
    (page 82) explicitly says NOT returns T or NIL.  It also says NULL is
    the same as NOT.  If you believe in transitive closure, one would
    conclude that (null (null something)) returns strictly T or NIL.  Poor
    programs may be broken by this; better programs never use (null (null
    ...)) but instead express the better intent (not (null ...)).

    Personally, I would consider (null (null ...)) to be "an error" and that
    the compiler for the Sun should be able to get away with returning the
    inner argument.  Things get worse when you separate nil and ().

I disagree; after all, NOT is the same as NULL.
(NOT (NULL <something)) has long been an idiom for
"always return T or NIL".

I'll bet the Sun compiler does the same thing for
(NOT (NULL <something>))?