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

Re: [Scheme-reports] Unhygienic macros?

Sanel Zukan scripsit:

> As someone who is interest in getting almost full control of expansion
> (with expected consequences) and focusing on other
> interpreter/compiler details than implement various expanders, I'm
> still quite interest in old and well known 'define-macro'.

With explicit renaming, you get the effect of `define-macro` simply by
not renaming anything.   But sharp tools cut: you can use gensyms (as
Common Lispers do) to work around the problem of bindings in the macro
shadowing references at the point of macro call, but you can't do anything
about bindings at the point of call shadowing references in the macro.

In the end, the only way to get full control is to write a complete
preprocessor that translates your chosen language comprehensively into
Scheme.  This is essentially what Racket allows, meaning that absolutely
everything is up for grabs: the Racket system compiles Algol 60 into
Scheme, for example.

John Cowan      cowan@x
        "Not to know The Smiths is not to know K.X.U."  --K.X.U.

Scheme-reports mailing list