chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] macro systems and chicken (long)


From: Alex Shinn
Subject: Re: [Chicken-users] macro systems and chicken (long)
Date: Sat, 05 Apr 2008 21:32:56 +0900
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin)

>>>>> "John" == John Cowan <address@hidden> writes:

    John> Alaric Snell-Pym scripsit:
    >> Syntax-rules is handy for simple stuff, but I'd hate
    >> for it to be the only macro system I had - I like to
    >> think of it as a shorthand for a reasonably common
    >> case, TBH.

    John> I think quite otherwise: I would never write a
    John> macro in any system other than syntax-rules -- all
    John> other macro systems strike me as standing on a
    John> foundation of quicksand.

DEFINE-MACRO is just EVAL.  Syntactic closures is just EVAL
with the two extra env parameters, one of which the compiler
already has (the usage env) and one of which is easy to
record.  Add in MAKE-SYNTACTIC-CLOSURE, IDENTIFIER? and
IDENTIFIER=?, it's maybe a couple hundred lines of code
altogether.  It's difficult to even imagine a simpler macro
system from either an implementation or semantic viewpoint.

SYNTAX-RULES is more complicated to implement.

-- 
Alex




reply via email to

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