On Wed, 16 Sep 2009, Brian Mastenbrook wrote: > I imagine that very few users ever need to import libraries at level 1, > assuming that the rnrs meta library is the most common way of getting at > `syntax-case' & friends. I would imagine that even fewer ever need to touch a > level greater than 1, or lower than 0. My general preference is to use > `syntax-rules' whenever possible, and to dip into `syntax-case' when it's > absolutely necessary for the task at hand. As such, I very rarely need to > touch phases at all. Others seem to use `syntax-case' even when it's not > necessary at all, but rarely do I see metasyntax. (If *anyone* has written a > library import for phase >= 2 I'd like to see it. I can vaguely understand > why one might need to use a phase <= -1, but I'd like to see a good example > for that one too.)
I don't have many practical examples, but the R6RS identifier-syntax macro needs set! at level -1. I dislike let(rec)-syntax, so higher phases are rare in my code. In my experience, let(rec)-syntax and internal define-syntax are the root of all evil as far as the complications of phases are concerned. If we restricted macro definitions to the top-level or library toplevel, I have an inkling that the whole question of phases would have been easier to resolve. Not a certainty, but a stroing suspicion. Andre _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
