[Top][All Lists]
[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
- Function vectors: +funvec-20030516-1-c.patch, (continued)
- Function vectors: +funvec-20030516-1-c.patch, Miles Bader, 2004/05/16
- Re: Function vectors: +funvec-20030516-0-c.patch, Stefan Monnier, 2004/05/16
- Re: Function vectors: +funvec-20030516-0-c.patch, Miles Bader, 2004/05/16
- Re: Function vectors: +funvec-20030516-0-c.patch, Stefan Monnier, 2004/05/16
- Re: Function vectors: +funvec-20030516-0-c.patch, Miles Bader, 2004/05/16
- Re: Function vectors: +funvec-20030516-0-c.patch, Stefan Monnier, 2004/05/17
- Re: Function vectors: +funvec-20030516-0-c.patch, Miles Bader, 2004/05/17
- Re: Function vectors: +funvec-20030516-0-c.patch, Stefan Monnier, 2004/05/18
- Re: Function vectors: +funvec-20030516-0-c.patch, Richard Stallman, 2004/05/17
- Re: Function vectors: +funvec-20030516-0-c.patch, Richard Stallman, 2004/05/17
- Re: Function vectors: +funvec-20030516-0-c.patch,
Miles Bader <=
- Re: Function vectors: +funvec-20030516-0-c.patch, Richard Stallman, 2004/05/18
- Function vectors: +funvec-20030518-0-c.patch, Miles Bader, 2004/05/18
- Re: User-reserved element in byte code vectors, Lars Brinkhoff, 2004/05/06
- Re: User-reserved element in byte code vectors, Stefan Monnier, 2004/05/06
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/06
Re: User-reserved element in byte code vectors, Stefan Monnier, 2004/05/02