emacs-devel
[Top][All Lists]
Advanced

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

Re: Saving match data


From: Michael Heerdegen
Subject: Re: Saving match data
Date: Wed, 28 Sep 2016 20:37:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> > This sounds crazy.  Sorry about this ignorant question: Why do we
> > use this model of match data: a global state that is changed as a
> > side effect in thousands of circumstances.
>
> That's a design choice with which we've lived for ever.

It's still not too late to build something better on top of it.


> I sometimes dream about extending pcase to support something like
>
>     (pcase <e>
>       ((re "^\\(?header:[^:]*\\):\\(?value:.*\\)") (cons header value))
>       ...)
>
> of course, it would also take multiple branches and merge them into
> a single DFA, and in some versions it even brings world peace,

Ambitious!


Michael.



reply via email to

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