Re: [Scheme-reports] Unhygienic macros? Sanel Zukan (25 May 2013 14:43 UTC)
Re: [Scheme-reports] Unhygienic macros? John Cowan (25 May 2013 17:49 UTC)

Re: [Scheme-reports] Unhygienic macros? John Cowan 25 May 2013 17:49 UTC

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@ccil.org
        "Not to know The Smiths is not to know K.X.U."  --K.X.U.

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports