<div dir="ltr"><div class="gmail_extra" style>Great post Mikael! So happy to read your thoughts.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 5, 2013 at 6:37 PM, Mikael <span dir="ltr"><<a href="mailto:mikael.rcv@gmail.com" target="_blank">mikael.rcv@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br></div><div>The syntactic-closures based macro systems (syntax-rules/syntax case including define-syntax, syntax-rules, let-syntax, letrec-syntax) bring incredible complexity and with that low debuggability through a very complex identifier concept based a kind of duality of the identifier symbol in itself and the syntactic environment in which it is used in a particular instance, and brings a complex API for handling macros with this, that by nature is not Schemy and not suited for debugging.</div>


<div><br></div><div>Per came with the suggestions above based on having spent approx 6 months fulltime on developing the Black Hole module system, which does hybrid define-macro and syntactic closures expansion.</div><div>


<br></div><div>There might be some caveat I didn't get, but, I'd guess you could actually make a macro expander that supports both an alias macro system as per above and a syntactic-closures for compatibility with code that uses it, possibly by splitting expansion into two expansion phases, thus isolating all the identifier-related complexity.</div>


<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"></blockquote></blockquote></div><br></div>
<div class="gmail_extra" style>While talking about the syntactic-closures, If we ignore syntax-case, I'll disagree that it brings "incredible" complexity. I've been uncertain</div><div class="gmail_extra" style>
on syntactic-closures for years, while this Holiday I finally got spare time reading its implementation in riaxpander/chibi-scheme, I found</div><div class="gmail_extra" style>the concept of it is quite straight forward. Though I deadly missed an easy-to-understand, concrete implementation with document for it during</div>
<div class="gmail_extra" style>the learning process.</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>I've cloned such a system in gambit, and keep digging on how to integrate hygiene with module system and gambit's compiling process.</div>
<div class="gmail_extra" style><br></div><div class="gmail_extra" style>Thanks</div><div class="gmail_extra" style>Meng</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>
<br></div></div>