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

Re: [Scheme-reports] Legacy caar to cddddr

Ray Dillinger scripsit:

> It was possible to implement a general macro version (that parsed
> the token and expanded it as far as necessary) of the "c(a|d)+r"
> operators using the old "explode" and "implode" commands to destructure
> the symbol itself, but those have been eliminated since, I think,
> R4RS. And I don't think it would work with current macrology anyway.

Surely it would not.

I once wrote a traditional Lisp (not Scheme or CL) interpreter once
that handled these directly in EVAL.  If a symbol in operator position
had no definition, it was checked for being of the right form, and if
so, its argument was evaluated and the c*r was executed on the spot.
It didn't work in APPLY, more by oversight than anything else.

As I remember, in that system the operator position was evaluated
repeatedly until it became a primitive, a funarg, or a lambda expression
(or a constant, in which case an error was signalled).

John Cowan <cowan@x>             http://www.ccil.org/~cowan
Fundamental thinking is ha-ard.  Let's go ideology-shopping.
                        --Philosopher Barbie

Scheme-reports mailing list