From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: New rx implementation with extension constructs Date: Sat, 7 Sep 2019 10:13:45 -0400 Message-ID: References: <4FEFB231-9880-4C05-8E5F-63CB64368DC6@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="139536"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 07 16:14:14 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i6bTh-000aC2-F1 for ged-emacs-devel@m.gmane.org; Sat, 07 Sep 2019 16:14:13 +0200 Original-Received: from localhost ([::1]:35270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6bTf-00012z-Kw for ged-emacs-devel@m.gmane.org; Sat, 07 Sep 2019 10:14:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54834) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6bTZ-00012s-Nb for emacs-devel@gnu.org; Sat, 07 Sep 2019 10:14:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6bTY-0002bo-Gr for emacs-devel@gnu.org; Sat, 07 Sep 2019 10:14:05 -0400 Original-Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]:41956) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i6bTY-0002b9-CH for emacs-devel@gnu.org; Sat, 07 Sep 2019 10:14:04 -0400 Original-Received: by mail-oi1-x22d.google.com with SMTP id h4so7325066oih.8 for ; Sat, 07 Sep 2019 07:14:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Fj1Y+PV5gtDkAOiTRx3iSUgTep8+SEoXx4sQbaDYw2U=; b=uLo4UkLPTLFs6XexprFni9+q2q2eWzGh+BopkrYVFMS6E3z+fkFTWSH2eyzUVB69ui +LwRf6G7jcDoPa2WjIZJRxGdQQ30qzhfaywaw3wpe74wJKSeFgNsydlFIOj5eM+1IeCF p8WHN1pEnY8yW8CGqu3A1L5hsFOgHYRBepqX8JFqVrhya8rQ6AHYrbOdIHXPO5mrCCyw wW6I+QcB+PRfJp20FsmJg9X7Jr8y0ZY/GbYzd+ZgIDxRdhvC4ex9pwOF+avPUlUx+Mrw QPPferYou8NgfgWlZnP3Fe1108rvUQO1CNeIfBgg+ogAO5Y3ZyF612ARvfTvkHI0yVmG dHmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Fj1Y+PV5gtDkAOiTRx3iSUgTep8+SEoXx4sQbaDYw2U=; b=llC7jgMY6+xg7KAJgOlVAl2FQ1mbfo+MMUZIR4xq/NB6sH0jb4O2PHvjvkWEX9TwFh NhDs9PdE1QHOoCKUg+I3xK0oSUMAQ56CNDfzzi0cQd1Nv/D4KsDlPVYj4KCivpSKBdae 6hZmH1GBy7rrzILZlmy/Zg03Xw+lPKZxyI51dQPhcjMrz0h8m7uNqEjMtWOlLnVywrjs naB58ElpdbQH5nm2Ev9MHougYS8vY+XIEzZ4Ym6UQvRFtpV+6ERaTExS91r/DqgLFkDh p83bleMWgmQfU+Yr+r0B356quU0Wmk2YI3MRx/P5qEqnUA5BzE+wsoIukonyyk5vCUkJ IV3Q== X-Gm-Message-State: APjAAAUhcca5V3auX1EpTsoPrYMNvoF1K8C8RzAL+/9VYITZBhAs4kO1 O+pRMDb6SaJEdTtU4787a5tm+2CT9rdnXp7Tbj0= X-Google-Smtp-Source: APXvYqwiHGwuI7oOkx4HNumdbI90BDl6M3K28XaITdJcRL+rV5tu2wrrcKeBxky4povmzSobmNgbcTq1dkjZxyn5PbA= X-Received: by 2002:aca:fc91:: with SMTP id a139mr10676428oii.173.1567865642744; Sat, 07 Sep 2019 07:14:02 -0700 (PDT) In-Reply-To: <4FEFB231-9880-4C05-8E5F-63CB64368DC6@acm.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239927 Archived-At: On Fri, 6 Sep 2019 at 10:09, Mattias Engdeg=C3=A5rd wrot= e: > (NAME RX-FORMS...) > ((NAME ARGS...) RX-FORMS...) > > where the `seq' wouldn't be necessary, but the argument list syntax no lo= nger 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.