[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
issue SYNTACTIC-ENVIRONMENT-ACCESS, version 4
- To: cl-compiler@sail.stanford.edu
- Subject: issue SYNTACTIC-ENVIRONMENT-ACCESS, version 4
- From: dick@wheaties.ai.mit.edu
- Date: Tue, 21 Mar 89 12:32:05 EST
- Cc: cperdue@sun.com, dick@wheaties.ai.mit.edu
- In-reply-to: Sandra J Loosemore's message of Sun Mar 12 10:18:08 1989
Cris Perdue was kind enough to send a copy of this proposal on to me.
I think that this fills an obvious hole in Common Lisp and should be
adopted. It would definitely have been useful to me in implementing
my SERIES macro package. However, I think that there are a couple of problems.
(1) The proposal should say somewhere what happens if an environment
gets returned out of its dynamic context. In particular, what happens
in the first example if KIND-OF-VARIABLE is defined as follows:
(DEFMACRO KIND-OF-VARIABLE (VAR &ENVIRONMENT ENV)
`(VARIABLE-KIND ',VAR ',ENV))
I assume very bad things happen.
(2) I think it is very odd indeed to allow implementations to ignore
type and ftype information and fail to put it in the environment.
(3) I do not understand why we need to have AUGMENT-ENVIRONMENT.
Except for the recently added :declare argument it is completely
redundant with LET, SYMBOL-MACROLET, FLET, and MACROLET.
What is worse, while AUGMENT-ENVIRONMENT fully captures the
functionality of SYMBOL-MACROLET, and MACROLET, it behaves very oddly
with regard to LET and FLET. In particular, if I understand it right,
it could be used to set things up so that the compiler thought a given
variable was a local varible, but it does nothing to actually create the
variable so things can be stored in it. What does this even mean?
The same goes for FLET. What function is going to end up being called
when instances of the given function appear? Perhaps the compiler is
supposed to be able to work all this out. If so this needs to be explained.
I would strongly recommend that AUGMENT-ENVIRONMENT be eliminated.
It just is not that hard to have macros expand into the right uses of
let-like forms before recursing to do further processing. In any
case, it seems that they will have to continue doing that for LET and
FLET even if AUGMENT-ENVIRONMENT is retained.
(4) I agree that things should be kept just to the smallest proposal.
Dick waters.