[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Argument lists: a proposal to shoot at
- To: NGALL@G.BBN.COM, gls@ZARATHUSTRA
- Subject: Re: Argument lists: a proposal to shoot at
- From: Guy Steele <gls@Think.COM>
- Date: Fri, 27 Jun 86 14:45 EDT
- Cc: common-lisp@SU-AI.ARPA, gls@AQUINAS
- In-reply-to: <[G.BBN.COM]26-Jun-86 19:17:24.NGALL>
Date: 26 Jun 1986 19:17-EDT
How about keeping the number of functions down and eliminating the
'encoding' in MAX-ARGS, and using correct terminology with the
following one-function alternative to FUNCTION-MIN-ARGS, -MAX-ARGS,
-HAS-KEYWORD-PARAMETERS, and -KEYWORD-PARAMETERS. I think
FUNCTION-KEYWORD-PARAMETER-P addresses an idiom common enough to
warrant its own function.
FUNCTION-PARAMETERS function [Function]
Returns Q, P, R, K, a list of keywords explicitly accepted by the
function (order undefined), and A. Note that if K is false, the list
is necessarily empty.
I have to admit (blush) that another design criterion I employed implicitly
was that it should be possible to acquire most of the information without
either consing on the fly or requiring an explicit pre-stored list of the
In your proposal for FUNCTION-PARAMETERS, I observe that returning K
is redundant: K is true iff [(the keyword list is not empty) or A].
That's not to say that returning K separately isn't a good idea.