emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function vectors: +funvec-20030516-0-c.patch


From: Miles Bader
Subject: Re: Function vectors: +funvec-20030516-0-c.patch
Date: Mon, 17 May 2004 18:54:47 -0400
User-agent: Mutt/1.3.28i

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]