emacs-devel
[Top][All Lists]
Advanced

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

Re: master ea93326: Add `union' and `intersection' to rx (bug#37849)


From: Stefan Monnier
Subject: Re: master ea93326: Add `union' and `intersection' to rx (bug#37849)
Date: Fri, 13 Dec 2019 08:55:59 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> But as a user now I wonder what's the difference between `or` and
>> `union` and also why there has to be a difference.
> You've convinced me -- plain 'or' is better. I've pushed a patch.
> As a pleasing side-effect, some existing rx expressions are now more 
> optimised:
> (or (any "a-z") (any "0-9")) now becomes "[0-9a-z]" instead of 
> "[a-z]\\|[0-9]".

BTW, if you like the fact that the old system made it clear&sure that
the result is optimized, then I think it should be introduced as
a syntax like

    (any (union "a-z" (intersection "0-9" "6-a")))


-- Stefan




reply via email to

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