Language extension / "behavior"

Martin Simmons martin at lispworks.com
Wed Jan 25 15:28:33 UTC 2023


>>>>> On Wed, 25 Jan 2023 16:00:58 +0100, Didier Verna said:
> 
> Martin Simmons wrote:
> 
> > I think it does, because section 3.5.1.4 Unrecognized Keyword
> > Arguments says that an error must be signaled for unrecognized
> > keywords in a safe call, so that will not happen for an extension
> > keyword.
> 
>   I'm not sure I understand this. Do you mean that safety declarations
> don't apply to extensions ?

No.

> On the other hand, this section says: "It is not permitted to supply a
> keyword argument to a function using a name that is not recognized by
> that function [...]", but my reading of it is that if an extension
> provides an additional keyword argument, then the function actually
> "recognizes" it, so it seems to me that this section should not apply at
> all.

I mean that, in general, users can expect the "behavior" of calling a standard
function with a non-standard keyword in safe code to be "it signals an error".

If it does something else, then that has changed "the behavior described in
this standard" (1.6) and so that should only happen as part of a language
extension.

That's why I think the answer to your original question <<if the term
"behavior" could encompass additional keyword arguments passed to a function
or macro>> is yes.

-- 
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/



More information about the pro mailing list