Alexander D. Knauth writes:

 > > At least it's one that works. It feels like cheating to use dynamic
 > > scoping to get around a problem with lexical scoping, but knowing when
 > > to cheat is a fundamental competence when dealing with any bureaucracy ;-)
 > 
 > Um, the reason a syntax parameter is better is that it *does*
 > follow the lexical scoping rules, where the unhygienic version does
 > weird things you wouldn't expect. Using datum->syntax is cheating a
 > lot more, and syntax parameters deal with problems like this in a
 > much better way.

I agree that datum->syntax is cheating a lot more, no question.

Still, I just used it, and I don't feel bad about it because it makes
my code a lot more readable. I had gotten to the point of having a
macro introduce generated identifiers as syntax parameters for use by
another macro generated by the first macro as well.

Actually, I felt exactly like when I have to fight a type system: I
know my solution is OK, but the compiler cannot prove it and therefore
rejects it. In those cases I feel entitled to cheat as much as
necessary.

 > P.S.  Have you read Fear of Macros? If you haven't, I highly
 > recommend it because it's awesome.

It is. I had read it a year ago, and now re-read it. I'll probably have
to read it again in the future, but it *is* awesome :-)

Konrad.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to