From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Arbitrary function: find the number(s) of expected arguments Date: Sat, 19 Mar 2016 12:21:02 -0700 (PDT) Message-ID: References: < <56E8906C.5050405@lanl.gov> > <<83y49e731p.fsf@gnu.org>> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1458415302 15419 80.91.229.3 (19 Mar 2016 19:21:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Mar 2016 19:21:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii , Paul Pogonyshev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 19 20:21:29 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 1ahMRF-000222-4W for ged-emacs-devel@m.gmane.org; Sat, 19 Mar 2016 20:21:29 +0100 Original-Received: from localhost ([::1]:50139 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahMRE-0005eL-2g for ged-emacs-devel@m.gmane.org; Sat, 19 Mar 2016 15:21:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahMR0-0005eC-Ve for emacs-devel@gnu.org; Sat, 19 Mar 2016 15:21:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ahMR0-000314-75 for emacs-devel@gnu.org; Sat, 19 Mar 2016 15:21:14 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:22251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahMQv-00030Q-Bd; Sat, 19 Mar 2016 15:21:09 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u2JJL5D2005056 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 19 Mar 2016 19:21:05 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u2JJL4FC028160 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 19 Mar 2016 19:21:04 GMT Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u2JJL3AF013307; Sat, 19 Mar 2016 19:21:04 GMT In-Reply-To: <<83y49e731p.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 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:201896 Archived-At: > We have sub-arity, so I think we should remove it and leave an alias > that will call this new function for backward compatibility. Having > both sounds redundant. (I assume you meant `subr-arity', not `sub-arity'.) Ignoring all the rest... This sounds wrong to me. Just calling the new code (which I have not looked at, but which I presume does for arbitrary functions what `subr-arity' does for primitives) would NOT provide backward compatibility, precisely because it would (presumably) NOT have the same behavior as `subr-arity' for non-primitives - it would not raise an error. Any existing code that depends on an error being raised by `subr-arity' would break. E.g., (condition-case err (subr-arity 'foo) (error (do-something)))