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: Function vectors: +funvec-20030516-0-c.patch Date: Mon, 17 May 2004 18:54:47 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040517225447.GF6421@fencepost> References: <85ekpz5twj.fsf@junk.nocrew.org> <874qqiao9o.fsf@tc-1-100.kawasaki.gol.ne.jp> <20040515231754.GB20052@fencepost> <87r7tlggue.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 1084834909 30540 80.91.224.253 (17 May 2004 23:01:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 May 2004 23:01:49 +0000 (UTC) Cc: emacs-devel@gnu.org, Miles Bader Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue May 18 01:01:43 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 1BPr78-0005RI-00 for ; Tue, 18 May 2004 01:01:42 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BPr78-00087Y-01 for ; Tue, 18 May 2004 01:01:42 +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 1BPr21-0002lr-Oa for emacs-devel@quimby.gnus.org; Mon, 17 May 2004 18:56:25 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BPr14-0002R6-9z for emacs-devel@gnu.org; Mon, 17 May 2004 18:55:26 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BPr0X-0002J1-Kv for emacs-devel@gnu.org; Mon, 17 May 2004 18:55:24 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BPr0X-0002Iy-CZ for emacs-devel@gnu.org; Mon, 17 May 2004 18:54:53 -0400 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.34) id 1BPr0R-0008Rf-34; Mon, 17 May 2004 18:54:47 -0400 Original-To: Richard Stallman Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i Blat: Foop 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:23603 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23603 On Mon, May 17, 2004 at 07:04:34AM -0400, Richard Stallman wrote: > ! @defun make-funvec kind num-params > ! @code{make-funvec} returns a new function vector containing @var{kind} > ! and @var{num-params} more elements (initialized to @code{nil}). > > Is this function really worth having? Why not use only `funvec'? Hmmm, I was mostly just following the example of the `vector' type. It does seem marginally useful to be able to create a vector-like type without explicitly specifying all the elements at creation-time, but perhaps for a special purpose type like funvecs it's not worth the extra overhead. [In my previous patches, Fmake_funvec was also called by other C functions to do the basic creation, but has since been supplanted by the `make_funvec' C function (which has different, somewhat more convenient for C functions, arguments) in that role.] My only personal use of funvecs (creating a closure) just calls `curry'. So I'll take it out, and if there's demand, it can be added back later. > ! This function cannot be used to make byte-code functions, even though > ! they are a sort of funvec --- to do that, use the > > To say "cannot" is not clear. What does that mean? It gets an error? > You should avoid such usage? Currently, yes, it does return an error if the KIND argument is not a symbol (in byte-code objects it's a list); see my additional reply for more about that. -Miles -- `To alcohol! The cause of, and solution to, all of life's problems' --Homer J. Simpson