This page is part of the web mail archives of SRFI 17 from before July 7th, 2015. The new archives for SRFI 17 contain all messages, not just those from before July 7th, 2015.
Shriram Krishnamurthi wrote >Lars Thomas Hansen wrote: > >> It's useful for syntactic (rather than procedural) abstraction. > >Equally, by modifying the meaning of an existing (and dangerous"!") >Scheme primitive, it raises the possiblity of bizarre and inadvertent >errors, especially through the use existing macro libraries. This is >all the more likely given that (a) syntax-rules doesn't support guard >expressions, and (b) the default pattern that a programmer would use >is of the form ?x -- which matches both the old and new forms. (In >contrast, if the default pattern in library code were (?setter ?x >...), then it wouldn't match an identifier, which would be safe -- but >this change has it the wrong way around.) This is a good point (though at least SRFI-17 won't break working code). The syntax rules language could stand some improvements. Currently we can "guard" matching on pairs and vectors but not on atomic data like identifiers; adding that capability would make it both easier to use and less error-prone. --lars