On 2015-05-21 07:15AM, Matthew Flatt wrote: >I've been working on a new model of macros for Racket.
> http://www.cs.utah.edu/~mflatt/scope-sets-5/ Minor typo in the last paragraph of Section 1.1: "insprired". Also, shouldn't the x's under syntax-rules and in the expansion of (m) have a 'b' in their scope sets (since they're in the syntax-rules scope)? Or aren't they? Overall I found it relatively clear, but (as with much of Racket's documentation) I felt like the order and the details of the presentation obscured things a bit. I had to read and re-read things more times than I would have liked to convince myself that it all made sense. I'm very new to Racket, so take this with a grain of salt, but: - Labelling scopes with the name of the binding form instead of letters ("{let, let-syntax, lambda}" instead of "{a, b, c}") would make it *much* clearer and obviate some of the explanatory text. - I feel like the key idea is that adding a scope makes the inner scope sets bigger, and that an identifier refers to the binding with the largest subset of the reference's scope set. I'd put that at the very beginning, rather than leaving it until after the bit about macro expansion adding a scope. Or at *least* give it a heading of its own. - I found the use-site scope argument a little confusing. I got it, but it took a while. Labelling the scopes better would probably help. But also...I think this probem can occur if you invoke the macro from any scope which contains the macro definition? There should be some way to make that clear: the use-site needs a scope added to ensure that *references* to macro arguments are never treated as lexical ancestors, but *definitions* of names passed in can (and should) be. --Josh -- 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.