emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Arbitrary function: find the number(s) of expected arguments


From: Drew Adams
Subject: RE: Arbitrary function: find the number(s) of expected arguments
Date: Sat, 19 Mar 2016 12:21:02 -0700 (PDT)

> We have sub-arity, so I think we should remove it and leave an alias
> that will call this new function for backward compatibility.  Having
> both sounds redundant.

(I assume you meant `subr-arity', not `sub-arity'.)

Ignoring all the rest...

This sounds wrong to me.  Just calling the new code (which I
have not looked at, but which I presume does for arbitrary
functions what `subr-arity' does for primitives) would NOT
provide backward compatibility, precisely because it would
(presumably) NOT have the same behavior as `subr-arity' for
non-primitives - it would not raise an error.

Any existing code that depends on an error being raised by
`subr-arity' would break.  E.g.,

(condition-case err
    (subr-arity 'foo)
  (error (do-something)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]