[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: User-reserved element in byte code vectors
From: |
Stefan Monnier |
Subject: |
Re: User-reserved element in byte code vectors |
Date: |
19 May 2004 11:19:15 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
> For what sort of closures? This currying implementation originated with
> the closures in my lexical-binding implementation -- _after_ I had
> implemented the mechanism for doing closures, I realized that it was
> precisely the same as the currying operator, and so now I called it that,
> as that's a more interesting operation in standard emacs. But it's the
> same thing as closures for me (not just similar, the same).
I'd be interested to see how you use those `curry' thingies, BTW.
E.g. what does
(let ((x 0))
(lambda () (setq x (+ x 1))))
get translated into?
The reason I ask is because a common closure representation is almost the
one you suggested except that instead of
(funcall #[closure f a1 a2] a3 a4)
=> (f a1 a2 a3 a4)
the reduction rule looks like:
(funcall #[closure f a1 a2] a3 a4)
=> (f #[closure f a1 a2] a3 a4)
so that the function `f' can modify the vector in order to perform a `setq'
on the free variable. Of course, the above representation doesn't work
as straightforwardly if the free variable is shared by more than
one closure.
Stefan
- Re: User-reserved element in byte code vectors, (continued)
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/18
- Re: User-reserved element in byte code vectors, Stefan Monnier, 2004/05/18
- Re: User-reserved element in byte code vectors, Miles Bader, 2004/05/18
- Re: User-reserved element in byte code vectors, David Kastrup, 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/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 <=
- 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, 2004/05/20
- 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