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: Michael Heerdegen
Subject: Re: Arbitrary function: find the number(s) of expected arguments
Date: Sat, 19 Mar 2016 17:27:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux)

Philipp Stephani <address@hidden> writes:

> Knowing the arity in cases like this requires either evaluating the
> function, or complex parsing of its definition. It is very reasonable
> to assume that (func-arity 'g) would return (0 . many), because that
> is g's arity as far as the Lisp interpreter is concerned.

Thanks, that's what I wanted to say, but couldn't formulate that
well. ;-)

Even if you would do a complex analysis of the definition: since we have
conditionals, and whether a function call is perform can depend on
conditions, and the result of the evaluated condition is only known when
running the code, even this complex analysis still would have
limitations.

Michael.



reply via email to

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