From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: User-reserved element in byte code vectors Date: 16 May 2004 19:53:48 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <85smepfzqo.fsf@junk.nocrew.org> <85ad0wfkms.fsf_-_@junk.nocrew.org> <85oepcdts4.fsf_-_@junk.nocrew.org> <85vfjf9s4j.fsf@junk.nocrew.org> <20040502094316.GB2836@fencepost> <85fzaiakb9.fsf@junk.nocrew.org> <20040503195701.GD21891@fencepost> <85ekpz5twj.fsf@junk.nocrew.org> <874qqiao9o.fsf@tc-1-100.kawasaki.gol.ne.jp> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084752014 21783 80.91.224.253 (17 May 2004 00:00:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 May 2004 00:00:14 +0000 (UTC) Cc: lars@nocrew.org, emacs-devel@gnu.org, Miles Bader Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon May 17 02:00:06 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BPVY6-0002IX-00 for ; Mon, 17 May 2004 02:00:06 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BPVY5-0001Gg-00 for ; Mon, 17 May 2004 02:00:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BPVW3-0000VS-T3 for emacs-devel@quimby.gnus.org; Sun, 16 May 2004 19:57:59 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BPVVY-0000Uc-Lj for emacs-devel@gnu.org; Sun, 16 May 2004 19:57:28 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BPVV2-0000Pz-9i for emacs-devel@gnu.org; Sun, 16 May 2004 19:57:27 -0400 Original-Received: from [206.47.199.141] (helo=simmts12-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BPVS5-0007sk-2M; Sun, 16 May 2004 19:53:53 -0400 Original-Received: from empanada.local ([67.71.116.83]) by simmts12-srv.bellnexxia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040516235352.DBPJ15788.simmts12-srv.bellnexxia.net@empanada.local>; Sun, 16 May 2004 19:53:52 -0400 Original-Received: by empanada.local (Postfix, from userid 502) id C355118F8DA; Sun, 16 May 2004 19:53:48 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: Original-Lines: 29 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23553 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23553 > I recommend leaving the first slot after `curry' unused. That way it > could be used later to control extensions, such as a feature to > specify the order of curried and noncurried arguments. We can already represent `curry' just fine with something like: (defun curry (f &rest args1) `(lambda (&rest args2) (apply ,f (nconc ',args1 args2)))) I.e. the only reason for the new construct proposed by Miles is to get better performance, so it only makes sense in cases where it's heavily used. The case that Miles is thinking about is closures. I don't know of any other case where such a construct would need good performance while not fitting within the mold of Miles's `curry'. Even just a "reverse curry" already sounds pointless: for the rare cases where you might want it, you can always easily replace a call like (reverse-curry f foo) into (curry (lambda (z y x) (f x y z)) foo) which is only slightly slower. Stefan