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 19:35:47 +0100 Message-ID: <871t76e2nw.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> <8360wi8mbo.fsf@gnu.org> <834mc28m3j.fsf@gnu.org> <8337rm8lfc.fsf@gnu.org> <831t768ilf.fsf@gnu.org> <83wpoy72yf.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458412581 8483 80.91.229.3 (19 Mar 2016 18:36:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Mar 2016 18:36:21 +0000 (UTC) Cc: Philipp Stephani , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 19 19:36:10 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 1ahLjN-00017L-Kv for ged-emacs-devel@m.gmane.org; Sat, 19 Mar 2016 19:36:09 +0100 Original-Received: from localhost ([::1]:50023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahLjM-0007Hp-Uk for ged-emacs-devel@m.gmane.org; Sat, 19 Mar 2016 14:36:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahLj8-0007HW-Ui for emacs-devel@gnu.org; Sat, 19 Mar 2016 14:35:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ahLj8-0008IM-7A for emacs-devel@gnu.org; Sat, 19 Mar 2016 14:35:54 -0400 Original-Received: from mout.web.de ([212.227.17.12]:52148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahLj4-0008Hb-7w; Sat, 19 Mar 2016 14:35:50 -0400 Original-Received: from drachen.dragon ([94.218.210.27]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0MAdst-1aWecx1sxH-00BrXh; Sat, 19 Mar 2016 19:35:48 +0100 In-Reply-To: <83wpoy72yf.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Mar 2016 20:11:20 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) X-Provags-ID: V03:K0:siywI/jmsz6gWJi6t5e902g3DSBdmHGkGAGg8SmSbsCiOQuBbax 4Luzt2JTHdteSpKs3a6Wfr9jhmo258sAl3OKROjgIu5pSHGmoqkgTJzavTIxB57lb3hpqJO 4kEl0ntFoOLa6bBr2SH7dXuD05EqCb4vzaapY9q3Xi1exkqBNTc8k5kDFBk3BGTe+1Rfzm8 J9xXgIB5kSLWfH+ik2+GA== X-UI-Out-Filterresults: notjunk:1;V01:K0:v3r4atA4zOc=:MHE2QYECvXTzxO+H6vYVKX Pq0fSwu8wxRpjoOAHhThtjfDBe0pdltMboiGq9tSgR483l+PjfA+t3yAbFWqJN+e+qqlV7+5i xaKannuMfzCUWAp2m25xS7F9dCOOOwSjRsJ6zEy3Vt0CeHpppUbb3pwTqOWkX7tN1HmRyBRSr dr+UNvKo1DyXo3Y2dJzrsndPCtOFHWGwcZd79vXevebPvTyqwSZKDVk07Hx41hrbl2hDKvf0o CIZtyIKyKxBnjUubpWHcwJWdbl4I3hs9bmIFeJkraYk0OyLHSd/4xXYFJD+muK2LetUCo3d5+ rCH28GpCqgT8wiG5uZGs9PH5SRBFVu0+xndVeOmFc8QbCkKpG/yUtn28Ln5NaywcpOyOE61Td YrOra7TAAloxxRy1KiOFysycKz8ROTAUyJRhxqDG9x2jXEXojAEFdqFacQG3QjeILsdtjQ0gi AIEkT9aShz7GtbyHF4xz0rZisZxcfX/o9jXkXVmNKEuVMn9TNzCYGSGerrVlaeBoyjnqrFaYm dH2Yq1l+YvcHT4FdbDXuXkeAIAtRyh6Shr5SMU+p5Hc45fYuzhndj/XDtaWd0lAtMPxSkfS3r aWYoXxh0LcMJgsyI7HJgXM64zpr0eBktTESOioJ3XZsqe+9L4ypKFSfpgtsTF4OCMqlElYUy0 jrJBWDCqXKBobF8Sured6NGG4Pm/EbWpmHqi1q7t92G5uIjoKWfyX3Sgz9sTfekC5oi6JDg2M I/xWYB7zHXO0pvaySyAEqkm0vEjQcqLB/RnDwOa1vHKdUlGm0dCeR411whbjp/S0CZB3tWnK X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.12 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:201894 Archived-At: Eli Zaretskii 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.