From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Arbitrary function: find the number(s) of expected arguments Date: Sat, 19 Mar 2016 17:27:29 +0100 Message-ID: <87h9g2e8lq.fsf@web.de> References: <56E8906C.5050405@lanl.gov> <83egb68vfy.fsf@gnu.org> <87zituefp9.fsf@web.de> <83a8lu8srs.fsf@gnu.org> <87twk2ebp2.fsf@web.de> <838u1e8od1.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458404872 22495 80.91.229.3 (19 Mar 2016 16:27:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Mar 2016 16:27:52 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 19 17:27:43 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 1ahJj4-0005nS-Gu for ged-emacs-devel@m.gmane.org; Sat, 19 Mar 2016 17:27:42 +0100 Original-Received: from localhost ([::1]:49595 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahJj3-0003U8-Vd for ged-emacs-devel@m.gmane.org; Sat, 19 Mar 2016 12:27:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahJiz-0003O4-60 for emacs-devel@gnu.org; Sat, 19 Mar 2016 12:27:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ahJiy-0008WS-Bx for emacs-devel@gnu.org; Sat, 19 Mar 2016 12:27:37 -0400 Original-Received: from mout.web.de ([212.227.17.11]:59982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahJit-0008VE-GE; Sat, 19 Mar 2016 12:27:31 -0400 Original-Received: from drachen.dragon ([94.218.210.27]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0LxfGh-1ZkCkL0JJL-017Gu8; Sat, 19 Mar 2016 17:27:30 +0100 In-Reply-To: (Philipp Stephani's message of "Sat, 19 Mar 2016 16:14:04 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) X-Provags-ID: V03:K0:5sLsj6IFTebHwk+lKv23sbYBd0ECEYjxiCnRQjYmY9PA4IBMn+3 BY/v8m7IfcPyOu/WBUTvbdJKd2CoFOchds0wBPRpZRVusVBBYLSR4FQMi+Qdg3Szg9OTWIs oX3DIz5JfEgEcaLz5dtT6QpC6IiBbZ8D3qZ+SxJmAecjSTCYf5JB15ucNGAP9SqWPSMDODj lGVMKO1/gy5MqQj0lpXiA== X-UI-Out-Filterresults: notjunk:1;V01:K0:kelzaaxD43Q=:MG6izMJ+ZakUvQl0CGial8 6DubOGPAuAuUL2l9Fkai2iWsoNkPqGg2dYhwtZ6S0U7TLSSZKX5bYLxeyZbfZfur0TmHTuc+W QY/0nUIm2K+/uhk2vm10dkgQqpmnxnxdaNhZ91XnrzCuUlHkmwx30r/nk5WvY32FinjWBCmGT C9FKOmdnHE8AMZEyTU46ir4KN/USTqu7gJsPz2Ul9IrRFhRNHzAgwybMWhciil97e1tt0W49c x9ZoqG/NXApuHMDxC0RiskzC5GFsk3eDtTVui9l2n/GMjinNRhzGWOA+QvAicgXQUgFR4SIQq 5atnFY2xtBFM56/fsgJrfW3Wce/52oOayC22A/O3YXPId3o4oNObhY4AXYCsw2w2iZN/7Id+e D9cLebmXuyAptk4c4thPFwLkdtCtOI8mcMzR9pc08oxJADCNiozQZN1WzLe96JdW/smpfJWdR d93blOKfMzjX5CQr8lCK4eEjZTtchlBXSJF4+i86nJBzPkldnhs+CHsxoCsNuKlXpE0oc6C9F zW8Nyi+UeCeprkU7oiBQAZozBDJ8RTSec4UCNI4Mb4ZuSWwq6UhI76nFL8uStr91I5r2wL23n r9giG/8hmfH6NpsDlYs4taxCm7/cghTPQR8Q23JMiNsW8Jjh9yAAKY7w7MlSQutplXnkXYKaK aS3LUNoa7XOjANf9g3t1lGkNZg/wzKa9zceuQ8EmANeq2qNxDuGZuyCh92byjZzxr70dT+E5G lfwLrnCgccPmLxQZIbYx7r9hIxImZFl8fvVOcxHLUtroHRtNp07JMT/A7uz5rV1VnASnrBYA X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.11 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:201874 Archived-At: Philipp Stephani 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.