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: Paul Pogonyshev
Subject: Re: Arbitrary function: find the number(s) of expected arguments
Date: Fri, 25 Mar 2016 18:16:55 +0100

Drew Adams wrote:
> IIUC, you _cannot_ use `func-arity' to test whether something
> is a subr.

Yes, but you can and should use `subrp' for that.

> IOW, I am repeating the same argument I made before, when
> I said that `subr-arity' should not be deprecated and
> simply replaced by `func-arity'.

I understood it as argument against aliasing `subr-arity' to
the new function: this can break _existing_ code if it relies
on the fact that `subr-arity' signals an error when called with
anything, but builtin.

> This is a step backward.  Unless we are really deprecating
> and replacing it, we should document `subr-arity' properly,
> as before, with the addition of cross-ref to see `func-arity',
> stating that it handles any type of function.

I personally don't see why we need two functions for this.
So, I would deprecate `subr-arity', but keep it around for
backward compatibility.

On the other hand, I don't really care. All I want is that there
is `func-arity' that works for _any_ function. I'm not attached
to anything in the patch and as long as `func-arity' works, feel
free to change anything.

Paul

reply via email to

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