[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: APPLYHOOK-ENVIRONMENT (Version 1)
- To: firstname.lastname@example.org
- Subject: Issue: APPLYHOOK-ENVIRONMENT (Version 1)
- From: masinter.pa@Xerox.COM
- Date: 6 Jan 89 11:49 PST
References: APPLYHOOK (CLtL p. 323)
Edit history: Masinter, 6-Jan-89, Version 1
The function APPLYHOOK is documented to take an optional environment
argument. CLtL says "Furthermore, the env argument is used as the lexical
environment for the operation; env defaults to the null environment."
However, there is no way that the lexical environment can effect the way in
which APPLYHOOK processes its arguments; it merely calls the specified
function, and function call is not affected by lexical environments. (The
"function" argument to APPLYHOOK is a function object.)
This has been regularly a source of confusion for programmers encountering
Proposal (APPLYHOOK-ENVIRONMENT:REMOVE-ENV): Remove the optional "ENV"
argument to applyhook.
Removes a very minor wart.
Most implementations accept an extra argument and then ignore it.
Cost to Implementors:
Remove optional ENV argument from APPLYHOOK and any code that passes one to
Cost to Users:
Remove any ENV argument passed to APPLYHOOK.
Cost of non-adoption:
Removes a wart.
This was discussed on the Common Lisp mailing list several years ago, but
slipped thru the cracks.