Email list hosting service & mailing list manager

Problem of implicit quasiquote Shiro Kawai (27 Jun 2020 18:08 UTC)
Re: Problem of implicit quasiquote Marc Nieper-Wißkirchen (27 Jun 2020 20:54 UTC)
Re: Problem of implicit quasiquote Shiro Kawai (28 Jun 2020 02:09 UTC)
Re: Problem of implicit quasiquote Shiro Kawai (28 Jun 2020 02:10 UTC)
Re: Problem of implicit quasiquote Marc Nieper-Wißkirchen (28 Jun 2020 08:14 UTC)
Re: Problem of implicit quasiquote Shiro Kawai (28 Jun 2020 09:34 UTC)
Re: Problem of implicit quasiquote Marc Nieper-Wißkirchen (28 Jun 2020 10:34 UTC)
Re: Problem of implicit quasiquote Shiro Kawai (28 Jun 2020 11:00 UTC)
Re: Problem of implicit quasiquote Shiro Kawai (28 Jun 2020 11:16 UTC)
Re: Problem of implicit quasiquote Marc Nieper-Wißkirchen (28 Jun 2020 12:50 UTC)
Re: Problem of implicit quasiquote Shiro Kawai (28 Jun 2020 20:45 UTC)
Re: Problem of implicit quasiquote Marc Nieper-Wißkirchen (28 Jun 2020 21:01 UTC)
Re: Problem of implicit quasiquote Shiro Kawai (28 Jun 2020 21:08 UTC)
Re: Problem of implicit quasiquote Marc Nieper-Wißkirchen (28 Jun 2020 21:14 UTC)
Re: Problem of implicit quasiquote Shiro Kawai (28 Jun 2020 21:42 UTC)
Re: Problem of implicit quasiquote Shiro Kawai (28 Jun 2020 21:52 UTC)
Re: Problem of implicit quasiquote Marc Nieper-Wißkirchen (29 Jun 2020 06:31 UTC)
Re: Problem of implicit quasiquote Shiro Kawai (29 Jun 2020 20:27 UTC)
Re: Problem of implicit quasiquote Marc Nieper-Wißkirchen (30 Jun 2020 13:11 UTC)
Re: Problem of implicit quasiquote Marc Nieper-Wißkirchen (04 Jul 2020 09:09 UTC)

Re: Problem of implicit quasiquote Marc Nieper-Wißkirchen 29 Jun 2020 06:30 UTC

Am So., 28. Juni 2020 um 23:52 Uhr schrieb Shiro Kawai <xxxxxx@gmail.com>:
>
> Oh by the way, nested quasiquote isn't always occur in the macro context.   If I want to write out a code fragment into a file or a network stream (which I do often), with some variable parts, I naturally use quasiquote.
>
>    (write `(define (foo ...) ,variable-part ...))
>
> Usually I copy&paste a working code snippet, add quasiquote in front, and modify the variable parts.    If the pasted code includes unpaired unquotes, I have to take care of them, too.  Again, it's just an annoyance, one that could've been avoided by a consistent design choice.

I understand. One approach in the right direction, I think, would be
to make quasiquote a bit more flexible. Quasiquote maintains a nesting
level and it makes sense to be able to set it initially to something
different than 0. E.g., we could have a macro `(qq ...)' that
increases the nesting level by one during the expansion of `...'
without actually producing a quasiquote.

Example:

(qq `(1 2 ,x))

would evaluate to (1 2 ,x).

Such a qq macro can be implemented portably with syntax parameters,
but a simple native implementation should be possible as well.

The alternative approach to allow `qq' as auxiliary syntax inside
quasiquote has the problem that is in not backward compatible and we
may run into problems if we want to produce qq.