From: Matt Wette <matt.wette@gmail.com>
To: guile-user@gnu.org
Subject: Re: syntax taste: use of unquote in macros
Date: Mon, 30 Mar 2020 16:43:47 -0700 [thread overview]
Message-ID: <2fc3bffd-da8d-eb4b-094b-649cf76e3fee@gmail.com> (raw)
In-Reply-To: <20200330103402.GC22399@tuxteam.de>
On 3/30/20 3:34 AM, tomas@tuxteam.de wrote:
> On Mon, Mar 30, 2020 at 12:07:07AM +0200, Zelphir Kaltstahl wrote:
>> On 3/29/20 5:11 PM, Matt Wette wrote:
>>> Hi All,
>>>
>>> I'm not sure if you know about this, but there is a discrepancy in the
>>> way some folks define macros to use unquote (aka ,). For example,
> [pmatch vs. match]
>
>> I'm not sure where I first read about pmatch doing the quasiquote
>> internally automatically and I of course had already forgotten about it,
> [...]
>
> I didn't even know about `pmatch'. Is it supposed to be equivalent
> to `match' (except that outer quasiquote, that is)?
>
> With the caveat that I don't have much of a stylistic feeling for
> Scheme, I'd clearly prefer `match': the writer has the choice of
> quote or quasiquote, as appropriate to the case -- and the reader
> sees what's going on (after all, quote and quasiquote are "low
> weight" primitives: everyone more or less knows what they do.
>
> But perhaps I misunderstood what you're after?
>
> Cheers
> -- tomás
The other thing about match that is attractive is that use of
quasiquote+unquote is "reflexive" (or maybe self-adjoint?)
in the following sense:
'(foo "bar") => (match-lambda (`(foo ,val) `(foo ,val))) => '(foo "bar")
next prev parent reply other threads:[~2020-03-30 23:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-29 15:11 syntax taste: use of unquote in macros Matt Wette
2020-03-29 22:07 ` Zelphir Kaltstahl
2020-03-30 10:34 ` tomas
2020-03-30 23:43 ` Matt Wette [this message]
2020-03-31 9:19 ` tomas
2020-03-30 13:07 ` Arne Babenhauserheide
2020-03-31 16:56 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2fc3bffd-da8d-eb4b-094b-649cf76e3fee@gmail.com \
--to=matt.wette@gmail.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).