From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: User-reserved element in byte code vectors Date: 06 May 2004 13:56:39 +0900 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> Reply-To: Miles Bader NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1083819528 3549 80.91.224.253 (6 May 2004 04:58:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 6 May 2004 04:58:48 +0000 (UTC) Cc: Lars Brinkhoff , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu May 06 06:58:41 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 1BLay1-0006a4-00 for ; Thu, 06 May 2004 06:58:41 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BLay1-0005DY-00 for ; Thu, 06 May 2004 06:58:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BLaxK-0001q2-KV for emacs-devel@quimby.gnus.org; Thu, 06 May 2004 00:57:58 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BLax6-0001np-FI for emacs-devel@gnu.org; Thu, 06 May 2004 00:57:44 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BLawY-0001RZ-PF for emacs-devel@gnu.org; Thu, 06 May 2004 00:57:41 -0400 Original-Received: from [202.32.8.214] (helo=TYO201.gate.nec.co.jp) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BLawY-0001R6-2H; Thu, 06 May 2004 00:57:10 -0400 Original-Received: from mailgate3.nec.co.jp (mailgate53.nec.co.jp [10.7.69.192]) by TYO201.gate.nec.co.jp (8.11.7/3.7W01080315) with ESMTP id i464uhh22894; Thu, 6 May 2004 13:56:59 +0900 (JST) Original-Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id i464uhI05116; Thu, 6 May 2004 13:56:43 +0900 (JST) Original-Received: from edtmg03.lsi.nec.co.jp ([10.26.16.203]) by mailsv3.nec.co.jp (8.11.7/3.7W-MAILSV4-NEC) with ESMTP id i464ugT02362; Thu, 6 May 2004 13:56:42 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp (localhost [127.0.0.1]) by edtmg03.lsi.nec.co.jp (8.12.10/8.12.10) with ESMTP id i464ueVN028438; Thu, 6 May 2004 13:56:41 +0900 (JST) Original-Received: from mcspd15 (mcspd15 [10.30.114.174]) by mcsss2.ucom.lsi.nec.co.jp (8.12.10/8.12.8/EDcg v2.01-mc/1046780839) with ESMTP id i464udaQ001407; Thu, 6 May 2004 13:56:39 +0900 (JST) Original-Received: by mcspd15 (Postfix, from userid 31295) id 73E4848E; Thu, 6 May 2004 13:56:39 +0900 (JST) Original-To: rms@gnu.org System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: Original-Lines: 30 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:22831 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22831 Miles Bader writes: > How about the following: If a byte-code vector's first element is > `curry', treat the remaining elements the same way my current (normal > vector) currying implementation works, otherwise treat it as a normal > byte-code function. Since the first element in a normal byte-code > object is an arg-list, it should never be an atom, so there shouldn't be > any conflict between the two uses. > > So for example: > > (curry '+ 1 2 3) > => #[curry + 1 2 3] BTW, some other advantage of such a representation -- * Having a name explicitly attached make it easier to see what it is, even if you've never encountered such a thing before, the "#[" tells you `hey it's connected with the lisp evaluator', and the first-element name gives you strong clue to determine just exactly what. * It leaves a clear path for other special magic-callable objects. E.g., another very useful notion is that of `reverse currying', where the curried arguments get attached to the _end_ of the argument list at call time, which could look like #[rcurry ...]. -Miles -- P.S. All information contained in the above letter is false, for reasons of military security.