[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] auxiliary syntax

A few minutes ago, Alex Shinn wrote:
> There are basically two things you may be trying to do when matching
> an identifier - match a binding or match that identifier by name.

Identifiers have no specific names, that's the whole point of hygiene.

> So in the upcoming R7RS community, how am I to distribute my
> portable SRE macro?  I'm being told to bind every SRE identifier to
> something and export it from the library.  Many of these are already
> in (scheme base) like `or' and `*', [...]

Right -- and that's a common way to claim that hygiene is a broken

> The solution some suggest is just to using renaming. [...] I could
> try to prefix the SRE identifiers consistently, e.g. `rx:' and
> `rx?', except oops, the underlying SRE engine doesn't know these
> names!

If it's hygienic -- ie, if it's comparing identifiers, then it would
work fine.  No impasse.

> Really, when you want to wrap macros on top of a non-macro-based
> DSL, the only solution is to use unhygienic matching.

(Worked fine in all cases I've seen, and I've seen a bunch of DSLs.)

> This is a SERIOUS problem.  I'm still unaware of any halfway decent
> solution, and although I don't think we're without hope, I'd
> appreciate it if people stop putting their head in the sand and
> pretending there isn't a problem here.

IMO the problem starts with not embracing hygiene.  Life becomes
simpler if you decide whether you want to go with it or without it.
The mess is when you're kind of using it in some cases but not in

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Scheme-reports mailing list