On Sep 11, John Cowan wrote: > Eli Barzilay scripsit: > > > [*] As an aside, this is exactly why I like `syntax-case' as a > > base system: instead of going with some obscure `rename' function > > or some representation of the lexical environment that surrounds a > > macro use, it deals directly with "symbols + some opaque value" > > where the latter represents the lexical information of the > > identifier and there is no need to understand what is actually > > kept there. > > And things like this are exactly why I dislike and avoid all > low-level macro systems and stick with syntax-rules: I consider > hygiene-breaking about the same as dynamically scoped local > variables, or goto: "an invitation to make a mess of one's program."
* The kind of hygiene-braking that makes a `make-foo' out of a *given* `foo' has no problems. * The kind of break that invents an `abort' out of thin air is the one you don't want. PLT does have a hygienic solution for that: http://blog.plt-scheme.org/2008/02/dirty-looking-hygiene.html * Besides the first item, `syntax-rules' suffers from a number of additional problems. One is the heavy cost of doing any kind of looping or other kinds of computations: in addition to making it hard to follow (and if you read Joe's "Merely Eccentric" text you probably know about that), it is slow. Usually that's not a problem, but when you deal with macros that expand to macros expansion times can become painful. * Another problem: write a `bind' macro that does this: > (bind ((x 1) (x 1)) x) bind: duplicate identifier in: (bind ((x 1) (x 1)) x) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
