[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Arbitrary function: find the number(s) of expected arguments
From: |
Clément Pit--Claudel |
Subject: |
Re: Arbitrary function: find the number(s) of expected arguments |
Date: |
Fri, 25 Mar 2016 14:28:12 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
Drew, your message is actually much harder to read in Thunderbird that the one
you replied to. Maybe using a plain text response in such cases would be best?
I had no trouble reading Paul's email, but yours was tricky.
On 03/25/2016 02:19 PM, Drew Adams wrote:
> (Please use plain-text for this mailing list from now on. I won't bother
> trying to convert the formatting this time.)
>
>
>
>> IIUC, you _cannot_ use `func-arity' to test whether something
>
>> is a subr.
>
> Yes, but you can and should use `subrp' for that.
>
> Of course you can. But that's irrelevant here. This is about what
> `subr-arity' does. Its behavior is not the same as `func-arity' for a
> non-subr. If we are not deprecating `subr-arity' then it is not enough to
> send users to the doc for `func-arity'.
>
>> 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.
>
> Yes. And?
>
> The same argument applies to just having its doc string tell users to use
> `func-arity'. That might not break existing code, but it breaks the doc
> string. It no longer says what function `subr-arity' does. And it gives the
> false impression that `func-arity' does the same thing. In fact, `func-arity'
> does something /different/ if the arg is not a subr.
>
>> 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.
>
> I personally feel the opposite - see my argument about not breaking existing
> code. But if that will be the decision then that's different. So far, there
> has been no decision to deprecate `subr-arity', AFAIK.
>
> 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,
>
> `func-arity' works for any function. So your want is satisfied.
>
> However, obtaining your want at the expense of also breaking a doc string is
> not right.
>
> feel free to change anything.
>
> I'm not going to change the broken doc string. But I certainly hope that
> someone will.
>
> When code is improved, if that change entails needing to change the doc, then
> the doc should be updated appropriately.
>
signature.asc
Description: OpenPGP digital signature
- RE: Arbitrary function: find the number(s) of expected arguments, (continued)
- Re: Arbitrary function: find the number(s) of expected arguments, Paul Pogonyshev, 2016/03/21
- Re: Arbitrary function: find the number(s) of expected arguments, Eli Zaretskii, 2016/03/25
- Re: Arbitrary function: find the number(s) of expected arguments, Paul Pogonyshev, 2016/03/25
- RE: Arbitrary function: find the number(s) of expected arguments, Drew Adams, 2016/03/25
- Re: Arbitrary function: find the number(s) of expected arguments, Paul Pogonyshev, 2016/03/25
- RE: Arbitrary function: find the number(s) of expected arguments, Drew Adams, 2016/03/25
- Re: Arbitrary function: find the number(s) of expected arguments,
Clément Pit--Claudel <=
- Use plain-text for mail [was: Arbitrary function: find the number(s) of expected arguments], Drew Adams, 2016/03/25
- Re: Use plain-text for mail [, Lars Magne Ingebrigtsen, 2016/03/25
- Re: Use plain-text for mail [, Andreas Schwab, 2016/03/25
- Re: Use plain-text for mail [was: Arbitrary function: find the number(s) of expected arguments], Yuri Khan, 2016/03/25
- Re: Arbitrary function: find the number(s) of expected arguments, Eli Zaretskii, 2016/03/25
- RE: Arbitrary function: find the number(s) of expected arguments, Drew Adams, 2016/03/25
- Re: Arbitrary function: find the number(s) of expected arguments, Eli Zaretskii, 2016/03/26
- Re: Arbitrary function: find the number(s) of expected arguments, Paul Pogonyshev, 2016/03/26
Re: Arbitrary function: find the number(s) of expected arguments, Stefan Monnier, 2016/03/15