[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 19:35:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
> You could convince me by posting a formal proof that such an
> implementation is impossible.
I can't prove the impossibility to implement semantics that are not
(yet) defined.
You haven't defined any semantics, you only said the interpreter would
know the answer. But I don't know the question.
That's why I ask what for
(advice-add 'f :around
(defun my-f-around-ad (orig-f &rest args)
(let ((some-value (g args)))
(if (function-p (car-safe some-value))
(apply (car some-value) (cdr some-value))
(if (h args)
(k args)
(apply orig-f some-value))))))
(function-arity 'f) should return. Because I hardly see how any return
value would make sense, or more sense than some others.
Surely could you say it should return 17. I cannot prove that it's not
possible to implement `function-arity' in a way so that it returns 17 in
this case, but my question would be how useful that return value would
be.
Michael.
- Re: Arbitrary function: find the number(s) of expected arguments, (continued)
- Re: Arbitrary function: find the number(s) of expected arguments, Eli Zaretskii, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments, Philipp Stephani, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments, Eli Zaretskii, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments, Philipp Stephani, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments, Philipp Stephani, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments, Eli Zaretskii, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments, Philipp Stephani, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments, Eli Zaretskii, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments, Philipp Stephani, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments, Eli Zaretskii, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments,
Michael Heerdegen <=
- Re: Arbitrary function: find the number(s) of expected arguments, Stefan Monnier, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments, Eli Zaretskii, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments, Stefan Monnier, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments, Elias MÃ¥rtenson, 2016/03/26
- Re: Arbitrary function: find the number(s) of expected arguments, Stefan Monnier, 2016/03/26
- Re: Arbitrary function: find the number(s) of expected arguments, Philipp Stephani, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments, Paul Pogonyshev, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments, Eli Zaretskii, 2016/03/19
- RE: Arbitrary function: find the number(s) of expected arguments, Drew Adams, 2016/03/19
- Re: Arbitrary function: find the number(s) of expected arguments, Michael Heerdegen, 2016/03/19