From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Davis Herring Newsgroups: gmane.emacs.devel Subject: Re: Arbitrary function: find the number(s) of expected arguments Date: Tue, 15 Mar 2016 16:45:00 -0600 Organization: XCP-1 Message-ID: <56E8906C.5050405@lanl.gov> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1458081941 17399 80.91.229.3 (15 Mar 2016 22:45:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Mar 2016 22:45:41 +0000 (UTC) To: Paul Pogonyshev , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 15 23:45:32 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 1afxiU-0007Iy-EF for ged-emacs-devel@m.gmane.org; Tue, 15 Mar 2016 23:45:30 +0100 Original-Received: from localhost ([::1]:51950 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afxiT-0006w7-VN for ged-emacs-devel@m.gmane.org; Tue, 15 Mar 2016 18:45:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afxiG-0006w2-3B for emacs-devel@gnu.org; Tue, 15 Mar 2016 18:45:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afxiC-0001DF-UU for emacs-devel@gnu.org; Tue, 15 Mar 2016 18:45:16 -0400 Original-Received: from proofpoint5.lanl.gov ([2001:400:4210:400::a5]:45764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afxiC-0001CG-MP for emacs-devel@gnu.org; Tue, 15 Mar 2016 18:45:12 -0400 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by mailgate5.lanl.gov (8.15.0.59/8.15.0.59) with ESMTP id u2FMj12m000594; Tue, 15 Mar 2016 16:45:01 -0600 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay1.lanl.gov (Postfix) with ESMTP id 32C1D13D1D7B; Tue, 15 Mar 2016 16:45:01 -0600 (MDT) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay1.lanl.gov Original-Received: from [128.165.123.233] (xray-r09.lanl.gov [128.165.123.233]) by mailrelay1.lanl.gov (Postfix) with ESMTP id 1EC1913D1D6E; Tue, 15 Mar 2016 16:45:01 -0600 (MDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.15.96, 1.0.38, 0.0.0000 definitions=2016-03-15_07:2016-03-15, 2016-03-15, 1970-01-01 signatures=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 2001:400:4210:400::a5 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:201789 Archived-At: > This way `my-foo' automagically accepts callbacks that expect one argument > (as in initial form), as well as those that want two arguments. What if your existing clients might have (defun paul-callback (computed-data &optional cached) ...) where they make calls to `paul-callback' themselves with the extra argument? It's fair to call this "abstruse" (maybe most/all clients just use a lambda), but it might also make you think about providing another callback interface. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.