[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Questions, comments and clarifications on clarifications
- To: navajo!Common-Lisp@SAIL
- Subject: Questions, comments and clarifications on clarifications
- From: edsel!eb@su-navajo.arpa (Eric Benson)
- Date: Sat, 14 Dec 85 18:30:16 pst
82. Is it gratuitous pseudo-generality to allow an arbitrary number of
arguments to XOR, instead of requiring exactly two? Give an example.
107. GET-SETF-METHOD should definitely take an optional environment
argument. Calling MACROEXPAND is seldom a good thing to do in a
program, even a compiler, since there may be intermediate macros which
require special handling. In this case an intermediate macro may have a
setf method. Even though a user program is probably incorrect if it
does not supply the environment argument to GET-SETF-METHOD, we should
make it optional for maximum compatibility with the existing standard.
Along with allowing an optional environment argument to GET-SETF-METHOD,
it is important to allow DEFINE-SETF-METHOD to take an &ENVIRONMENT
argument. It is also important that macros defined with
DEFINE-MODIFY-MACRO correctly pass the environment to GET-SETF-METHOD;
this belongs in an implementation note.
A hard question: Does MACROLET shadow a setf method or not?
(DEFUN LOSER (X)
(CAR X)
(DEFUN SET-LOSER (X Y)
(SETF (CAR X) Y))
(DEFSETF LOSER SET-LOSER)
(DEFUN LOSSAGE (X Y)
(MACROLET ((LOSER (X)
`(SYMBOL-VALUE ,X)))
(SETF (LOSER X) Y)))
Does LOSSAGE call SET-LOSER or SET?
130. I think it is better to say that anything other than a symbol or
an integer at the top level in a TAGBODY is evaluated normally, rather
than having special rules. This is not a major point, however.
144. Can an FLET shadow a DEFMACRO?
(DEFMACRO FOO ()
)
(DEFUN BAR ()
(FLET ((FOO () ...))
(MACROLET ((BAZ (&ENVIRONMENT ENV)
(IF (MACRO-FUNCTION 'FOO ENV)
"Lose"
"Win")))
(BAZ))))
Does (BAR) return "Win" or "Lose"? (See if you can guess what I think
it should do.)
268. There's no need to mention that COPY uses the user-specified copy
function for structures, since the user only specifies a @i(name) for the
function; the system supplies the definition.
Along the same lines, there really should be a true structural equality
comparison function, i.e. a case-sensitive EQUALP, or EQUAL which
descends into arrays and structures. It would also be nice to have a
graph isomorphism comparison function, but perhaps this is beyond the
scope of Common Lisp. I only brought it up because it cannot be written
portably so that it descends into all structures. How about graph
isomorphism modulo gensyms?
293. ROW-MAJOR-AREF should be SETFable.
295. Also include SETF of AREF, ROW-MAJOR-AREF, and SETF of
ROW-MAJOR-AREF among the functions which can access beyond the fill
pointer of an array.