From: Chris Vine <vine35792468@gmail.com>
To: "Linus Björnstam" <linus.internet@fastmail.se>
Cc: guile-user@gnu.org
Subject: Re: Threading / Pipe Macro (Chris Vine, Mark H Weaver)
Date: Tue, 9 Jul 2019 10:26:15 +0100 [thread overview]
Message-ID: <20190709102615.912d4b837c0449a4bf8210d4@gmail.com> (raw)
In-Reply-To: <c95c3aa9-bd06-4a17-9392-e6256b362144@www.fastmail.com>
On Tue, 09 Jul 2019 08:01:01 +0200
Linus Björnstam <linus.internet@fastmail.se> wrote:
> On Tue, 9 Jul 2019, at 01:02, Chris Vine wrote:
> > On Mon, 8 Jul 2019 23:10:28 +0200t
> > Zelphir Kaltstahl <zelphirkaltstahl@gmail.com> wrote:
> > > Hello Chris and hello Mark,
> > >
> > > Thank you both for posting your macros! This is really useful and I am
> > > looking forward to using this in the next situation where there would be
> > > deep nesting or where it seems appropriate in other ways.
> > >
> > > To understand what is going on in the macro, I wrote a lot of explaining
> > > comments and uploaded it in a new repository, where I intend to keep
> > > macros I come across and explain them, if I can:
> > >
> > > https://gitlab.com/ZelphirKaltstahl/guile-scheme-macros/blob/master/threading-pipe-macro/macro.scm
> >
> > You are using the wrong macro, because the one you have chosen has been
> > revealed to be unhygienic. Either use the syntax-rules one (which is
> > the simplest) or the revised syntax-case macro.
> >
> The comparison is also not really fair. The syntax-rules macro is doing
> a lot more. A simple syntax-rules macro just inserting everything in
> the leftmost position would loo something like
>
> (define-syntax ->
> (syntax-rules ()
> ((-> exp) exp)
> ((-> exp (proc args ...) rest ...) (-> (proc exp args ...) rest ...)
> ((-> exp proc rest ...) (-> (proc exp) rest ...))))
>
> I wrote this here in the mail without testing, so no guarantees that
> it would work. It is simple enough. I think it should work.
I am not sure what comparison you are referring to. However, I was
comparing Mark Weaver's syntax-rules macro with my revised syntax-case
macro, both of which have the same end result, and suggesting that
Zelphir should not use my original syntax-case macro (the one he has
referenced in his gitlab repository).
You must be thinking of something else.
next prev parent reply other threads:[~2019-07-09 9:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1204.1562538418.2685.guile-user@gnu.org>
2019-07-08 21:10 ` Threading / Pipe Macro (Chris Vine, Mark H Weaver) Zelphir Kaltstahl
2019-07-08 23:00 ` Chris Vine
2019-07-09 6:04 ` Linus Björnstam
[not found] ` <c95c3aa9-bd06-4a17-9392-e6256b362144@www.fastmail.com>
2019-07-09 9:26 ` Chris Vine [this message]
2019-07-09 9:40 ` Linus Björnstam
2019-07-09 9:58 ` Chris Vine
2019-07-09 10:52 ` Linus Björnstam
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=20190709102615.912d4b837c0449a4bf8210d4@gmail.com \
--to=vine35792468@gmail.com \
--cc=guile-user@gnu.org \
--cc=linus.internet@fastmail.se \
/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).