> On Sep 30, 2015, at 5:45 PM, Alex Knauth <alexan...@knauth.org> wrote: > > >> On Sep 30, 2015, at 4:19 PM, Lyle Kopnicky <lylew...@gmail.com >> <mailto:lylew...@gmail.com>> wrote:
>> That bothers me a bit. It looks unhygienic, as the quote function is being >> captured. I guess reader macros can't have hygiene? > > It is an unhygienic reader macro, because it captures the quote from its use > instead of racket's quote. > > It turns out reader macros can have hygiene, which I use for things like my > afl meta-language. Other languages like rackjure, curly-fn, and sugar/debug > also use hygiene in reader macros. > > I don't have time for a full explanation right now, but I'll come back in ~3 > hours (after choir rehearsal) and give you one if your interested. > > Alex Knauth Ok. For hygienic macros to work, there has to be a scope where the macro is used, and a scope where the macro is defined. You can define a current-syntax-introducer parameter in the main reader for the whole module, which you will call to introduce that scope on the entire module. Then in the reader-macro procedure, you can refer to that parameter and use on the input and output. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.