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: Miles Bader
Subject: Re: User-reserved element in byte code vectors
Date: 06 May 2004 13:56:39 +0900

Miles Bader <address@hidden> writes:
> 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.  Since the first element in a normal byte-code
> object is an arg-list, it should never be an atom, so there shouldn't be
> any conflict between the two uses.
> 
> So for example:
> 
>    (curry '+ 1 2 3)
>    => #[curry + 1 2 3]

BTW, some other advantage of such a representation --

  * Having a name explicitly attached make it easier to see what it is,
    even if you've never encountered such a thing before, the "#[" tells
    you `hey it's connected with the lisp evaluator', and the
    first-element name gives you strong clue to determine just exactly
    what.

  * It leaves a clear path for other special magic-callable objects.
    E.g., another very useful notion is that of `reverse currying',
    where the curried arguments get attached to the _end_ of the
    argument list at call time, which could look like #[rcurry ...].

-Miles
-- 
P.S.  All information contained in the above letter is false,
      for reasons of military security.




reply via email to

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