Hi all - <div><br></div><div>continuing the metacircular interpreter topic, at this point I am looking at the hygiene issue. Without trying to implement a full solution that include syntax and identifier objects, it seems that hygiene can be addressed via just substituting lexical identifiers introduced during the expansion process. </div>
<div><br></div><div>It seems doable to me because: </div><div><ul><li>the non lexical identifiers all have to resolve to an existing binding in the transform environment or throws compilation error - so they don't need special handling </li>
<li>since the interpreter will expand all parsed code, the substitution process can be ensured to be unique so there are no name conflicts (capturing or being captured) </li><li>basically lambda is the only place that I am introducing lexical binding (maybe case-lambda as well once I get to it), so substitution is localized - what I need is to ensure that it's not too aggressive and ending up substituting variables introduced by nested expressions </li>
</ul><div>The above basically automates CL's gensym approach to hygiene AFAICT. </div><div><br></div><div>I am sure this has been tried before - does anyone see/know of issues with the substitution approach above? Any ideas are appreciated, thanks, </div>
</div><div>yc</div><div><br><div class="gmail_quote">On Wed, Dec 8, 2010 at 12:19 PM, YC <span dir="ltr"><<a href="mailto:yinso.chen@gmail.com">yinso.chen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks Robby! <div><div></div><div class="h5"><br><br><div class="gmail_quote">On Wed, Dec 8, 2010 at 4:13 AM, Robby Findler <span dir="ltr"><<a href="mailto:robby@eecs.northwestern.edu" target="_blank">robby@eecs.northwestern.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
PS: check out this paper for an algorithm:<br>
<br>
<a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.54.8909" target="_blank">http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.54.8909</a><br>
<font color="#888888"><br>
Robby<br>
</font><div><div></div><div><br>
On Wed, Dec 8, 2010 at 6:11 AM, Robby Findler<br>
<<a href="mailto:robby@eecs.northwestern.edu" target="_blank">robby@eecs.northwestern.edu</a>> wrote:<br>
> Yes, outside in. Inside out doesn't work because the expander only<br>
> knows where the inside is when it sees a core (fully expanded) form.<br>
><br>
> Robby<br>
></div></div></blockquote></div>
</div></div></blockquote></div><br><br clear="all"><br>
</div>