Re: Why not a setf-able NIL ?
- From: Barry Margolin <barmar@xxxxxxxxxxxx>
- Date: Thu, 02 Oct 2008 18:20:20 -0400
In article <ymiskre3deu.fsf@xxxxxxxxxxxxxxxx>,
tar@xxxxxxxxxxxxx (Thomas A. Russ) wrote:
Barry Margolin <barmar@xxxxxxxxxxxx> writes:
In article <87k5csnpp1.fsf@xxxxxxxxxxxxxxxxxxxxxxxx>,
pjb@xxxxxxxxxxxxxxxxx (Pascal J. Bourguignon) wrote:
You must be very very sad. I know of no programming language
allowing you to redefined/reassing 42.
Fortran used to allow this. Parameters were passed by reference, and
when you passed a literal it passed a reference to its location in the
literal pool. If the procedure assigned that parameter, it would change
the literal.
This was probably implementation-dependent, but I've heard that it
occurred with many popular implementations.
Hah, I had thought of this as well.
You got really amusing effects when you managed to change the constant
zero (0) to something else.
And just for the record, back in my Lisp Machine days one of my users
managed to set NIL to non-NIL. SETQ had a check to make sure it wasn't
setting NIL or T, but SET didn't (I may be misremembering the exact
detail -- perhaps a locative was involved as well). Needless to say,
the system was not very happy after this, and it quickly crashed the OS.
I had lots of fun using DDT to figure out what had happened and unwedge
it. In the next OS release, Symbolics aliased the value cells of T and
NIL to a read-only memory page so the hardware would prevent this.
--
Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
.
- References:
- Why not a setf-able NIL ?
- From: kodifik
- Re: Why not a setf-able NIL ?
- From: Joshua Taylor
- Re: Why not a setf-able NIL ?
- From: kodifik
- Re: Why not a setf-able NIL ?
- From: Matthias Buelow
- Re: Why not a setf-able NIL ?
- From: kodifik
- Re: Why not a setf-able NIL ?
- From: Pascal J. Bourguignon
- Re: Why not a setf-able NIL ?
- From: Barry Margolin
- Re: Why not a setf-able NIL ?
- From: Thomas A. Russ
- Why not a setf-able NIL ?
- Prev by Date: Re: Why not a setf-able NIL ?
- Next by Date: Re: Finally making use of PowerLisp despite several **horrible** bugs it has
- Previous by thread: Re: Why not a setf-able NIL ?
- Next by thread: Re: Why not a setf-able NIL ?
- Index(es):
Relevant Pages
|