[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: User-reserved element in byte code vectors
From: |
Miles Bader |
Subject: |
Re: User-reserved element in byte code vectors |
Date: |
21 May 2004 10:28:43 +0900 |
Richard Stallman <address@hidden> writes:
> Essentially:
>
> (let ((env (vector 0)))
> (curry env (lambda (env) (aset env 0 (+ (aref env 0) 1)))))
>
> [of course, `env' is not visible to the user code]
>
> The word "essentially" means that this isn't really
> the answer to the question. What precisely are the Lisp
> objects produced?
The above code should be exact, except that `env' never exists a normal
named variable -- in the compiler it's a variable with a funny (not a
symbol) name, and at runtime, it's just a stack location (like other
"local" variables).
> Why use `curry' for this at all, rather than implementing
> a `closure' funcvec type?
Well, I have nothing particularly against a special closure type; it's
just that in this case it's not necessary -- curry provides exactly the
functionality I need.
I suppose I could make a special `closure' funvec type that actually
shared all its code with that for `curry', if secondary effects are an
issue (e.g., what describe-function says, etc).
Currently my compiler doesn't even compile such things properly, so
things are kind of off my radar... :-/
-Miles
--
=====
(^o^;
(()))
*This is the cute octopus virus, please copy it into your sig so it can spread.
- Re: User-reserved element in byte code vectors, (continued)
- Re: User-reserved element in byte code vectors, Richard Stallman, 2004/05/19
- Function vectors: +funvec-20030520-0-c.patch, Miles Bader, 2004/05/19
- Re: User-reserved element in byte code vectors, Kim F. Storm, 2004/05/19
- Re: User-reserved element in byte code vectors, Richard Stallman, 2004/05/19
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/19
- Re: User-reserved element in byte code vectors, Stefan Monnier, 2004/05/19
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/19
- Re: User-reserved element in byte code vectors, Richard Stallman, 2004/05/20
- Re: User-reserved element in byte code vectors,
Miles Bader <=
- Re: User-reserved element in byte code vectors, Richard Stallman, 2004/05/23
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/22
- Re: User-reserved element in byte code vectors, Richard Stallman, 2004/05/18
- Re: User-reserved element in byte code vectors, Stefan Monnier, 2004/05/16
- Message not available
- Message not available
- Function vectors: +funvec-20030516-0-c.patch, Miles Bader, 2004/05/16
- 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