[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
suggestion for ballot: :allow-other-keys
- To: common-lisp@SU-AI
- Subject: suggestion for ballot: :allow-other-keys
- From: David A. Moon <MOON%SCRC-TENEX%MIT-MC@SU-DSN>
- Date: Tue, 10 May 1983 19:26:00 -0000
This is a suggestion to address the query on page 71 of the laser edition.
I'm able to figure out whether this a kludge or not, but I'd like to solicit
a ballot on whether it is too inelegant to include in the language. Please
read the manual's writeups on &key before voting unless you understand keyword
In addition to the keyword arguments explicitly declared, all functions with
&key in their lambda list accept an additional keyword, :allow-other-keys.
If this keyword is supplied and the value is true, then no error is signalled
if the arguments to the function include unrecognized keywords. If :allow-other-keys
is unsupplied or supplied with an argument of nil, and the &allow-other-keys
symbol is not used in the lambda list, then it is an error if the argument list
contains keywords not listed in the lambda list.
This allows one to construct a keyword list that has been checked at some high
level, secure in the knowledge that no error will be signalled at a low
level. The keyword list can be passed to several different functions,
each of which will extract the keywords that are relevant to it. Note that
both &allow-other-keys and :allow-other-keys are useful features--neither
subsumes the other.