[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
**DRAFT** issue QUOTE-MAY-COPY
- To: jonl@lucid.com
- Subject: **DRAFT** issue QUOTE-MAY-COPY
- From: alarson@src.honeywell.com (Aaron Larson)
- Date: Wed, 11 Jan 89 10:14:09 CST
- Cc: jeff%aiai.edinburgh.ac.uk@NSS.Cs.Ucl.AC.UK, cl-compiler@sail.stanford.edu
- In-reply-to: Jon L White's message of Wed, 11 Jan 89 00:09:20 PST <8901110809.AA03550@bhopal>
- Posted-date: Wed, 11 Jan 89 10:14:09 CST
re: > I believe that QUOTE has to return THE argument it is given.
[That's Aarons' comment].
I say, "Suuuuuuure, you will get THE argument". Now, the only question
is, how do you know what you were given? Use EQ, use EQL? Why?
I say, use COALESCABLEP. That's good enough for identity of constants.
The only conceivable reason why the EQ/EQL version of identity could
matter is if you allow runtime updating of "constants" -- in that case,
you need a pointer to the real place that was updated rather than a
pointer to an equivalent copy. But we are outlawing constant modification,
right?
I don't think I quite agree with JonL's statement about the "only reason",
it appears to me that it would also be important in:
(defun foo () '(x y z))
(tailp (foo) (cons 'a (foo)))
My argument was an attempt to isolate the times at which the copying could
occur, and to point out that the times are not something that discussions
about QUOTE and EVAL can easily describe. For example:
(defmacro foomac () '(a b c))
(defun bar () (foomac))
(defun baz () (foomac))
Are (bar) and (baz) required to be EQ? If not, are subsequent calls to
(bar) required to be eq? If bar and baz are required to be eq, then how
about if foomac, bar, and baz are all in different files and compiled?
When is the copying EVAL allowed to occur?
I still think that we need to talk about a transformation occurring at a
specific time and specify what it is allowed to do, for example,
macroexpand then copy. What exactly the transformation is required to
preserve is essential. Is circular structure in code allowed? Only in
constants?
(defun foo () (when nil #1=(progn #1#)))
(defun bar () '#1=(a . #1#))
Are both foo and bar legal functions? In both cases the circular structure
is never evaluated.