`(scheme aux)` is a clever idea. I don't think define-syntax is enough to guarantee keyword hygiene, though.
If you `(define-syntax <>)`, it's still possible to write
`(let ((<> 1)) <>)` without errors. That makes it
possible for something inside the `let` scope to unhygenically
insert a `<>` into a macro that uses `cut` or `chain`
internally. An identifier macro would prevent this.
On 8/12/20 9:53 PM, John Cowan wrote:
Identifier macros aren't necessary. For example, to make <- work as shared auxiliary syntax, just bind it like this:
(define-syntax <-(syntax-rules ()((** head . tail)(syntax-error "invalid auxiliary syntax" head . tail))))
Now (<- 1 2 3) will signal an expansion-time error, and (+ 0 <-) will too because an ordinary macro can't be used in operand position.
Then you provide the magic (scheme aux) library, which binds every possible keyword using the above syntax-rules definition. Of course you always refer to it like (import (only (scheme aux) **)). Easy-peasy.
John Cowan http://vrici.lojban.org/~cowan xxxxxx@ccil.org
One Word to write them all / One Access to find them,
One Excel to count them all / And thus to Windows bind them.
--Mike Champion