On Apr 16, 2015, at 5:01 PM, Jos Koot <jos.k...@gmail.com> wrote: > But: > > (define quasiquote list) > (car '`x) ; -> quasiquote as well, which is not obvious. > > Racket has become very far in hygienic macros. > Is is time to think about hygienic read-tables too? > I have no idea how to acccomplish that. Sorry.
I think that even if the backquote where a “hygienic” reader macro, this would still produce ‘quasiquote. That’s because `x would read as (quasiquote x), where quasiquote is bound to, well, who cares what it’s bound to, it’s quoted as a symbol. But if it’s not quoted then: For an unhygienic backquote reader macro: (define quasiquote list) (define x 5) `x ; -> (quasiquote x), where quasiquote is bound to the definition above -> (list x) -> (list 5) -> ‘(5) For a hygienic backquote reader macro: (define quasiquote list) (define x 5) `x ; -> (quasiquote x), where quasiquote is bound to quasiquote from racket -> ‘x This already works in some cases with the current macro expander, if I extend the readtable with a mapping of the backquote character to a procedure that returns a syntax object that has lexical context telling it where the quasiquote identifier came from. But with the current macro expander, there are many cases where hygienic reader macros won’t work properly, which Matthew Flatt pointed out. -- You received this message because you are subscribed to the Google Groups "Racket Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-dev+unsubscr...@googlegroups.com. To post to this group, send email to racket-dev@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/26C66189-56C6-4BCB-AC36-C54AA1582E0C%40knauth.org. For more options, visit https://groups.google.com/d/optout.