On May 27, 2009, at 11:12 AM, Ramana Kumar wrote:
I remember one of the arguments for exporting auxiliary keywords was so that they could be renamed. This is usually demonstrated when you change "else" to be a translation in another language. I'm not sure how strong that argument is,
I don't think it's very strong. There is also a situation when two independently-developed libraries decide to define an auxiliary keyword (like =>, or ->, or ?, or whatever). If you import the two libraries, you have to rename/prefix some of the imports which just sucks.
but I have come across this in a real situation: the pmatch pattern matcher uses the underscore as a wildcard, but underscore is no longer a valid literal in R6RS. So I replace _ with ? in the pmatch library, then do (import (except (rnrs) _) (rename (pmatch) (? _))) in the script using pmatch so I can continue to use underscore.
So, pmatch's underscore now works, but syntax-case's or syntax-rules's underscore does not.
Of course, I am left with these questions: "Why does R6RS ban _?"
This is called "arbitrary restrictions".
and "Why is there an else keyword at all, what about using #t?"
I happen to like "else" visually since it does not start with the eye-irritating #\# character. And while you can use #t for "cond", you cannot use it for "case". You need a keyword there, so, it might as well be called "else". Aziz,,,
