[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
New, improved FUNCTION-TYPE-KEY-NAME proposal (version 2)
- To: Sandra J Loosemore <firstname.lastname@example.org>
- Subject: New, improved FUNCTION-TYPE-KEY-NAME proposal (version 2)
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Tue, 2 Feb 88 20:36 EST
- Cc: cl-cleanup@SAIL.STANFORD.EDU
- In-reply-to: <8801152125.AA12185@orion.utah.edu>
I favor FUNCTION-TYPE-KEY-NAME:SPECIFY-KEYWORD.
However, I'd like to point out a pitfall in the syntax, which I feel
should be documented in the discussion section. It may not be evident
to a user whether the proper declaration for MAKE-LIST is
(FUNCTION MAKE-LIST ((INTEGER 0) &KEY (:INITIAL-ELEMENT T)) LIST)
(FUNCTION MAKE-LIST ((INTEGER 0) &KEY (INITIAL-ELEMENT T)) LIST)
The former is what you propose, but the latter is more analogous to regular
lambda lists. If the former is correct, it would not be valid for a
compiler to diagnose the latter as invalid (note that X3J13 accepted
KEYWORD-ARGUMENT-NAME-PACKAGE in November). I don't see any way around
this problem, as I think the former declaration, as you proposed, probably
is the more desirable choice.
Also you didn't say in your proposal whether you intend that such a
declaration, without &ALLOW-OTHER-KEYS, is also a declaration that only
the listed keywords are valid. This should be stated explicitly.