emacs-devel
[Top][All Lists]
Advanced

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

Re: User-reserved element in byte code vectors


From: Lars Brinkhoff
Subject: Re: User-reserved element in byte code vectors
Date: 06 May 2004 08:17:32 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Miles Bader <address@hidden> writes:
> I'm a bit confused by how Lars is suggesting that byte-code vectors be
> used for currying.

It was only an idea thrown out for consideration.  I'm glad it spawned
some new ideas.

> From the Ffuncall code-snipped he posted, I gather that he was
> saying that the curried args be just a way to attach magic arguments
> to an existing byte-code vector.

To curry a function, you could copy the first six elements from the
byte-code object and put them into a new byte-code object along with
the curried arguments.  I don't think that usage would be quite as bad
as you envisioned (no trampoline, no consing when calling, etc), but
anway, I'm not defending it as your suggestion seems much more elegant:

> How about the following: If a byte-code vector's first element is
> `curry', treat the remaining elements the same way my current
> (normal vector) currying implementation works, otherwise treat it as
> a normal byte-code function.

Sounds good to me.

-- 
Lars Brinkhoff,         Services for Unix, Linux, GCC, HTTP
Brinkhoff Consulting    http://www.brinkhoff.se/




reply via email to

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