guile-devel
[Top][All Lists]
Advanced

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

Re: Enhancement to the syntax system?


From: Ludovic Courtès
Subject: Re: Enhancement to the syntax system?
Date: Tue, 10 Jul 2012 10:24:13 +0200
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.1 (gnu/linux)

Hi!

Stefan Israelsson Tampe <address@hidden> skribis:

> | It’s true that it’s annoying that the wrong binding is silently used.
> | Do you think it’s common enough to justify new syntax?
>
> Yes this highlights a comon problem when implementing racket match with #`.

Sure, but it’s not good-style.  ;-)  In general, ‘syntax-case’ is great,
but it’s low-level plumbing to be used with care, compared to
‘syntax-rules’.

> I do think
> that the best solution is to somehow extend the syntax expander to mimic my
> sugested
> #. and address@hidden The simple solution is to rewrite according to
>
> #`(... #.((x y) (f #'x #'y)))
>
> ->
>
> #`(let-syntax ((g (lambda (x) (syntax-case x () ((_ x y) (f #'x #'y))))))
>       (... (g x y))

Unlike syntax-{quote,unquote,...}, #. has no non-syntax-prefixed
equivalent.  And what it does is non-trivial.  So I don’t feel
comfortable with this extension, FWIW.

[...]

> I also feel that the issue needs to be
> liffted up to the
> community of at least syntax-case user crowd before doing anything Ill try
> to spur
> some discussions on it and come back later!

Yes, this should be discussed on c.l.s or scheme-reports.

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]