From: Lars Rune Nøstdal
Subject: Re: Why not a setf-able NIL ?
Date: 
Message-ID: <1223077621.10480.604.camel@blackbox>
On Wed, 2008-10-01 at 14:11 -0700, Tayssir John Gabbour wrote:
> On Oct 1, 11:35 am, ·······@eurogaran.com wrote:
> > 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.
> 
> You can setf a symbol named nil. In a modular way.
> 
> 
> (in-package :cl-user)
> (defpackage :odd
>   (:use :cl)
>   (:shadow :nil))
> (in-package :odd)
> 
> 
> ;; Now the fun begins.
> (defparameter nil 10)
> 
> (loop repeat nil
>       collect nil)
> 
> ;; => (10 10 10 10 10 10 10 10 10 10)
> 
> 
> 
> Tayssir


but .. but .. but .. now i want to do this:

  (setf 1 "wtf")

..i bet you can't do that, can you? .. eh? .. eh? .. eeh?

..hehe :)

-- 
Lars Rune Nøstdal   || AJAX/Comet GUI type stuff for Common Lisp
http://nostdal.org/ || http://groups.google.com/group/symbolicweb