Panicz Maciej Godek <godek.mac...@gmail.com> writes: > I think that this is the case for R6RS or R7RS, but as far as I can > tell, in R5RS it would be problematic.
I think the R5RS is implicitly silent on that by virtue of not having a library system. It says that a literal in a pattern will match "if it has the same lexical binding" and if an extension to R5RS provides a way to create different identifiers with the "same lexical binding" then that wouldn't contradict the standard. :-) I don't think we should obsess over compliance that much anyway though. The unhygienic 'foo is one of the few very strange things in Scheme IMO. > You'll never know. While it may seem unlikely to fix quote to mean > minus, in mathematical analysis the symbol is often used to mean the > derivative of a unary function, so it is quite possible that someone > would wish to write in some context > > (let ((quote deriv)) > (+ (f x) ('f x) (''f x))) > > On the other hand, your soultion would work if someone decided to > write > > (let ('deriv) > (+ (f x) ('f x) (''f x))) > > (which is IMO more elegant) IMO the rarity of such code, plus the easiness of fixing it, make that a non-issue. > Nevertheless, I think that even if 'x would map to (__quote__ x), it > could still happen that someone was using the __double_underscore__ > convention in her code (for some reason), and your allegations would > apply to this new situation as well. That's much less likely, and it needn't be underscores either. E.g. it could be %%quote instead. (Maybe we already have a convention for this, I don't know.) Anyway, if people don't like the idea for whatever reason then I won't push it. I just thought it would be neat to uphold the hygiene a little farther, and not make it break when a user binds an identifier that's a plain word like quote or syntax. Taylan