From: Noam Postavsky <npostavs@gmail.com>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: New rx implementation with extension constructs
Date: Sat, 7 Sep 2019 10:13:45 -0400 [thread overview]
Message-ID: <CAM-tV-8sWvK_J350nWjs=PUbYVpNW8-Hz2_fuDmiP4CFJUSh_w@mail.gmail.com> (raw)
In-Reply-To: <4FEFB231-9880-4C05-8E5F-63CB64368DC6@acm.org>
On Fri, 6 Sep 2019 at 10:09, Mattias Engdegård <mattiase@acm.org> wrote:
> (NAME RX-FORMS...)
> ((NAME ARGS...) RX-FORMS...)
>
> where the `seq' wouldn't be necessary, but the argument list syntax no longer follows Lisp tradition.
> Would it be palatable?
> ((NAME ARG1 ARG2 . REST-ARG) RX-FORMS...)
I guess mixing function-like and variable-like definitions in the same
form is already somewhat Schemish, so this would just be continuing in
the same direction. I don't feel strongly about it either way though.
> (rx-let ((flavour (&rest choices) (or "vanilla" choices)))
> (rx (flavour "strawberry" "chocolate")))
>
> expands to (rx (or "vanilla" (seq "strawberry" "chocolate"))) which wasn't the intention. It may be better to make rest arguments auto-splicing when substituted, which would work in all cases that I can think of.
Yeah, since it's easy to use auto-splicing to get a seq but not vice
versa, auto-splicing is a clear improvement.
next prev parent reply other threads:[~2019-09-07 14:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-02 21:19 New rx implementation with extension constructs Mattias Engdegård
2019-09-04 14:18 ` Mattias Engdegård
2019-09-04 17:03 ` Paul Eggert
2019-09-05 10:56 ` Aurélien Aptel
2019-09-05 11:17 ` Mattias Engdegård
2019-09-05 12:34 ` immerrr again
2019-09-05 19:04 ` Mattias Engdegård
2019-09-05 15:38 ` Noam Postavsky
2019-09-05 16:49 ` Mattias Engdegård
2019-09-06 14:09 ` Mattias Engdegård
2019-09-07 14:13 ` Noam Postavsky [this message]
[not found] ` <0E5A5E92-E48F-4003-A742-508663BA984A@acm.org>
2019-09-11 18:11 ` Mattias Engdegård
2019-09-17 12:53 ` Mattias Engdegård
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/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAM-tV-8sWvK_J350nWjs=PUbYVpNW8-Hz2_fuDmiP4CFJUSh_w@mail.gmail.com' \
--to=npostavs@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=mattiase@acm.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).