[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New rx implementation with extension constructs

From: Noam Postavsky
Subject: Re: New rx implementation with extension constructs
Date: Sat, 7 Sep 2019 10:13:45 -0400

On Fri, 6 Sep 2019 at 10:09, Mattias Engdegård <address@hidden> 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?


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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]