From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: Arbitrary function: find the number(s) of expected arguments Date: Fri, 25 Mar 2016 18:16:55 +0100 Message-ID: References: <56E8906C.5050405@lanl.gov> <83y49e731p.fsf@gnu.org> <83pouj0wx8.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c04809cdb9577052ee2ba5d X-Trace: ger.gmane.org 1458926235 2129 80.91.229.3 (25 Mar 2016 17:17:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Mar 2016 17:17:15 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 25 18:17:15 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ajVMI-0003Sd-KN for ged-emacs-devel@m.gmane.org; Fri, 25 Mar 2016 18:17:14 +0100 Original-Received: from localhost ([::1]:57221 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajVMH-00025b-DK for ged-emacs-devel@m.gmane.org; Fri, 25 Mar 2016 13:17:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajVM1-00025T-Kq for emacs-devel@gnu.org; Fri, 25 Mar 2016 13:16:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ajVM0-0001ls-Mh for emacs-devel@gnu.org; Fri, 25 Mar 2016 13:16:57 -0400 Original-Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:34441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajVM0-0001lo-G0; Fri, 25 Mar 2016 13:16:56 -0400 Original-Received: by mail-oi0-x22e.google.com with SMTP id n80so8791705oig.1; Fri, 25 Mar 2016 10:16:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=f3TqomM0W78g+rancEh1zexB9SI/v6IsZjWN5OKOsj0=; b=0/aP9L2+Yx0rfJQDhmr+2VlYdVQ6A3l+G5e70N6S5uuLJYedgG/efznip1pDlbP84r /px8TEtKnAxfUAR15Id4MG14PcnxT5j+euJOTRtvezIrA+d7LpFGlTQiYGHncT1hIiFw GjFIeTxXo1WlmolsrDT4tobLWWLREeVAerFAuQJ7h15rMOpO2Hpp5T+vQrT1dtHKnyW3 lXgWUHLftR83RDpoFqYZ2Vzc1IDpdpOTAb85ZeaIm8TNFxhyKIj9UOK/Gu9lgQ/UEeYn zudnaupL1VBnwpwrXBuTHDrf6PyddpBn7NACMSU0b9T4q9ORD022QRh9q9wEQRdvoQoZ Y+7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=f3TqomM0W78g+rancEh1zexB9SI/v6IsZjWN5OKOsj0=; b=EHM+9mjfwiSaog9RSl7YYrnRIclXagbYrxiR8qv5IbuJTQehyNr/Kh3EY4VRrqpBEz n9sddoi2AUAaOumsZm9C9lTOXl/NU2ZRmIEQ6WPPD19Ln7T0fWzpbKN6GzEWqM70NVH6 pwvN0wW6mEreDznkhAdjz+DylU8ZiZbLRjBNdo0UzJM0aUrTd43EvcnAdfWy/y8ZFkWI ITJW87kBlxhjyV40xKBe3f1TzeIOIq4aE79m25nv4gOVHgVqmawaUTA+oD95P7LtGurz N14OOuQ1xirr6wAOCeGRVFjLwr8P3fXnvEne7n0/LoZnnzZOqNR4YIsVOc/NUqRXIfGI 13Gw== X-Gm-Message-State: AD7BkJL7/DBR+t6vJS1eVMSJKl9E9JqpQcsxdlHEsr+JSNymILwelh1IhSDRUFP5dzrSkD12MPdGRqROtTtuNQ== X-Received: by 10.157.0.40 with SMTP id 37mr7769493ota.174.1458926215982; Fri, 25 Mar 2016 10:16:55 -0700 (PDT) Original-Received: by 10.202.71.7 with HTTP; Fri, 25 Mar 2016 10:16:55 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202232 Archived-At: --94eb2c04809cdb9577052ee2ba5d Content-Type: text/plain; charset=UTF-8 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 --94eb2c04809cdb9577052ee2ba5d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Drew Adams wrote:
&g= t; IIUC, you _cannot_ use `func-arity' to test whether something
<= div class=3D"gmail_quote">> is a subr.
<= br>
Yes, but you can and should use `subrp&= #39; for that.

> IOW, I am repeating the same argument I made before, when
> I said that `subr-arity' should not b= e deprecated and
> simply replaced by `f= unc-arity'.

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

> This is a step backward.= =C2=A0 Unless we are really deprecating
>= ; and replacing it, we should document `subr-arity' properly,
> as before, with the addition of cross-ref to se= e `func-arity',
> stating that it ha= ndles 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 comp= atibility.

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

Paul
--94eb2c04809cdb9577052ee2ba5d--