[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: CONSTANT-SIDE-EFFECTS
- To: cl-cleanup@SAIL.STANFORD.EDU
- Subject: Issue: CONSTANT-SIDE-EFFECTS
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Mon, 23 Nov 87 21:24 EST
- In-reply-to: <871120-114909-1773@Xerox>
Date: 20 Nov 87 11:49 PST
From: Masinter.pa@Xerox.COM
Some additional puzzles:
- - - - - -
(defvar a (list 1 2 3 4))
(defconstant b a)
(setf (car a) 4)
I don't know what I think about this one, it's real nasty. The first
paragraph on CLtL p.69 probably says that defconstant is not allowed
to make a fresh copy of the list; if true, this is code certainly an
error, although the error might be rather difficult to detect in any
practical implementation.
- - - - - -
(nconc `(,x 5 6 7) y)
I prefer to call this an error, on the grounds that ` should be as much
like ' as possible. For extra help in thinking about this, try
(nconc `(5 6 7) y)