Why not a setf-able NIL ?



As we all know, in Common Lisp logical falsehood is represented by the
non-symbolic atom NIL, which in turn happens to be also the empty list
'().
Everything not nil is true, so in lisp 0 is true.
If -however- NIL were a symbol, one could program things like (let
((nil 0)(number iterations)) (loop while number..) which would
simplify code very often, as the C dudes quickly noticed.
1- I wonder whether there is some really important (theoretical)
reason for not making NIL setf-able, aside implementation simplicity
or speed considerations (practical reasons).
Of course, the programmer would have then to keep in mind that (cons a
nil) could no longer yield (a), and things like that. In other words:
the language would be much more powerful with a redefinable falsehood,
but with greater power comes greater responsibility.
2- Actually, the very fact that the reserved word NIL exists seems to
suggest that this possibility was once regarded.
.



Relevant Pages

  • Re: Why not a setf-able NIL ?
    ... Everything not nil is true, so in lisp 0 is true. ... reason for not making NIL setf-able, ... the very fact that the reserved word NIL exists seems to ...
    (comp.lang.lisp)
  • Re: Why not a setf-able NIL ?
    ... in Common Lisp logical falsehood is represented by the ... k> non-symbolic atom NIL, ... what is non-symbolic in NIL? ...
    (comp.lang.lisp)
  • Re: Simple noob question.
    ... absent some strong compelling reason (not in ... returning NIL instead of 3. ... (defvar *key* nil) ... special binding key and then returning a closure ...
    (comp.lang.lisp)
  • Re: EQ optimizations?
    ... evaluate to NIL. ... primitive int or long, and a boxed one implemented by wrapping that ... former representation is desirable for performance, ... and for one reason or another not inlined by the implementation in ...
    (comp.lang.lisp)
  • Re: Hey Nigel!
    ... Dave Keegan wrote: ... There's a reason for that - a lot has happened since 2006... ... it looks like you know as much about football as you do about ... should've played the banker and gone Holland to win 3 nil and 4 nil, ...
    (rec.sport.rugby.union)