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: Stefan Monnier
Subject: Re: Arbitrary function: find the number(s) of expected arguments
Date: Sat, 26 Mar 2016 13:20:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

>> As mentioned to my reply in the corresponding thread, you're better off
>> just making the call and catching the potential
>> `wrong-number-of-arguments' signal.
> Isn't that really dangerous? You're going to catch that error from any
> function call, not just the top one that you are interested in.  Sounds like
> something that would be he'll to debug if it hit you.

That error should normally never be signaled, so the likelihood of there
being a problem is extremely small.  I've never had trouble with it,
including when debugging things.  Even when debugging
wrong-number-of-arguments errors, this error has always been re-signaled
in the "alternative calling case", so it never ended up hiding
a real problem (and even less so causing such a problem).

Of course, in theory it can.  But then, in theory testing the function's
arity can also fail in all kinds of ways.


        Stefan



reply via email to

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