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

Re: [Scheme-reports] auxiliary syntax



On Fri, Jan 11, 2013 at 11:29 PM, Eli Barzilay <eli@x> wrote:

Alex Shinn wrote:
>
> Syntactic closures would make it easy to implement unhygienic
> parameters, but I guess that's not possible with syntax-case.

This doesn't make any sense.  Any macro facility is still something
that works by having bindings for identifiers, so whatever it is, it
can't avoid having macro names bound and having these bindings respect
the usual scoping rules.  (I can only guess that the above is a broken
attempt to talk about something more similar to a `let-syntax' with an
unhygienically constructed name.)

Right, syntactic-closures makes it easy to do this with
its free variables, but as you say, the syntax-parameters
approach is not very useful here.

Alaric Snell-Pym wrote:
>
> AIUI, Alex's goal is to have the same unhygiene that (quote ...)
> has.  The symbols within need to be taken just as symbols, not as
> identifiers, and that's that.

Right that's his goal, and it is a broken one.  As I said earlier,
life is fine if you accept or reject hygiene completely.

I agree with you 100% when talking about mixing hygienic
and unhygienic macros.  It can't possibly work.

I'm not proposing an unhygienic macro, but rather a macro
that can match identifiers by their unhygienic symbol name
(e.g. via syntactic-closure-expr or syntax->datum). It must
otherwise preserve hygiene, as I explained before.

This will never break.  It's equivalent to writing a macro which
can parse and optimize literal PCRE regex strings, it just
happens to be using sexps, and is therefore tempting to write
portably with syntax-rules.  Except you can't - you need the
syntax-rules/literal-keywords.

-- 
Alex

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports