[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Summary of message on function objects & :allow-other-keys
- To: BENSON @ SPA-NIMBUS
- Subject: Summary of message on function objects & :allow-other-keys
- From: Alan Bawden <ALAN @ MIT-MC>
- Date: Wed, 11 May 1983 03:41:00 -0000
- Cc: Common-Lisp @ SU-AI
- In-reply-to: Msg of 10 May 1983 17:12-PDT from BENSON at SPA-NIMBUS
:allow-other-keys sounds ok to me.
Date: Tuesday, 10 May 1983, 17:12-PDT
From: BENSON at SPA-NIMBUS
The first argument to APPLY or FUNCALL (for which FUNCTIONP is
true) must be a compiled-code object or a lexical closure. Anything
else is an error.
I would object to this. I certainly agree that there is an inelegance in
allowing symbols to serve as functions when passed as arguments to APPLY
and FUNCALL (Algol 68 would be proud of a feature like this), but this is
not an inelegance with any far-reaching consequences (assuming we clarify
the manual about the term "closure", which it does tend to use rather
randomly), and it is a traditional convenience supported by most of Common
Lisp's ancestors.
I don't see any compelling reason to introduce an ENCLOSE function, or to
make environments first-class data objects. The latter seems like a
unnecessary constraint on implementors. (I might go for an ENCLOSE like in
the Scheme "Revised Report" that takes a \representation/ of an
environment, but I still don't see the need for it.)
A function to retrieve the lambda-expression from a closure also seems to
me to be assuming a bit to much about the internals of a closure (why
should that information still be there? What happens if it is a \compiled/
closure). I presume each implementation can provide rational debugging
facilities to allow me to determine just where a closure originated.