[Prev][Next][Index][Thread]
Re: Q: spec on #rest and #key
You have grasped it. From an implementor's viewpoint
you have no way to find where the key/value pairs end
and the "rest" arguments begin (without loss of
generality). You are in an either/or situation.
BTW 90% of the cases you have #key if you need #rest.
The #rest args is very convenient to pass to
next-method for example as it contains all key/value
pairs so that apply(next-method, override-key:
override-value, args) will do the right thing.
Language lawyers just join in if there is a better
explanation to the question.
Gabor
--- Roland Paterson-Jones <rolandpj@bigfoot.com>
wrote:
> The DRM states that "If the parameter list specifies
> a #key in addition to a
> #rest it is not said to accept a variable number of
> arguments", and "If a
> function that accepts keyword arguments is called,
> it will signal an error
> if ... the arguments following the required
> arguments are not keyword/value
> pairs. This is true even if the function specifies
> #rest".
>
> I read it that you cannot use variable arguments
> with any function that uses
> keywords. Is this correct? If so, why?
>
> Thanks
> Roland
>
>
>
>
>
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
Follow-Ups:
References: