Skip to content
 

Syntactic closures in Sly

Continuing my quest in mastering Scheme, I have completely revamped Sly‘s front-end and implemented syntactic closures in the source code expander. The initial motivation was to get alpha-renamed identifiers as the result of the expansion phase, to make it easier to apply subsequent transformations on the source code (like Dybvig’s Fixing Letrec). But it was a worthy effort in itself. All previous derived syntax that was internally rewritten using gensym now is written using syntactic closures, making them clearer and much more robust because of the added hygiene.

Leave a Reply