[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"exceptions" possibly based on misconception; and EVAL strikes again
- To: Hic at SCRC-TENEX, Guy.Steele at CMU-10A
- Subject: "exceptions" possibly based on misconception; and EVAL strikes again
- From: Jon L White <JONL at MIT-MC>
- Date: Thu, 04 Feb 1982 22:04:00 -0000
- Cc: common-lisp at SU-AI
The several "exceptions" just taken about implementing functional programming
may be in part due to a misconception taken from RMS's remark
Date: 29 January 1982 19:46-EST
From: Richard M. Stallman <RMS at MIT-AI>
Subject: Trying to implement FPOSITION with LAMBDA-MACROs.
. . .
The idea of FPOSITION is that ((FPOSITION X Y) MORE ARGS)
expands into (FPOSITION-INTERNAL X Y MORE ARGS), and . . .
In JONL's suggestion, the expander for FPOSITION operates on the
entire form in which the call to the FPOSITION-list appears, not
just to the FPOSITION-list.
This isn't right -- in my suggestion, the expander for FPOSITION would
operate only on (FPOSITION X Y), which *could* then produce something like
(MACRO . <another-fun>); and it would be <another-fun> which would get
the "entire form in which the call to the FPOSITION-list appears"
HIC is certainly justified in saying that something is wrong, but it looked
like to me (and maybe Guy) that he was saying alternatives to lambda-macros
were wrong. However, this side-diversion into a misconception has detracted
from the main part of my "first suggestion", namely to fix the misdesign in
EVAL whereby it totally evaluates a non-atomic function position before trying
Date: 1 February 1982 20:13-EST
From: Howard I. Cannon <HIC at MIT-MC>
Subject: The right way
To: Guy.Steele at CMU-10A
. . .
If, however, we do accept (LAMBDA ...) as a valid form that self-evaluates
(or whatever), then I might propose changing lambda macros to be called
in normal functional position, or just go to the scheme of not
distinguishing between lambda and regular macros.
So how about it? Regardless of the lambda-macro question, or the style
of functional programming, let EVAL take
((MUMBLE ...) A1 ... A2) into `(,(macroexpand '(MUMBLE ...)) A1 ... A2)
and try its cycle again. Only after (macroexpand '(MUMBLE ...)) fails to
produce something discernibly a function would the nefarious "evaluation"
come up for consideration.
[P.S. -- this isn't the old (STATUS PUNT) question -- that only applied to
forms which had, from the beginning, an atomic-function position.]