From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Saving match data Date: Wed, 28 Sep 2016 20:37:22 +0200 Message-ID: <877f9v50rh.fsf@web.de> References: <87twd0j7fi.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1475087915 30932 195.159.176.226 (28 Sep 2016 18:38:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Sep 2016 18:38:35 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 28 20:38:31 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpJkU-0007Ld-1b for ged-emacs-devel@m.gmane.org; Wed, 28 Sep 2016 20:38:30 +0200 Original-Received: from localhost ([::1]:60591 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpJkS-000592-Gz for ged-emacs-devel@m.gmane.org; Wed, 28 Sep 2016 14:38:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpJjd-00056y-Fr for emacs-devel@gnu.org; Wed, 28 Sep 2016 14:37:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpJjX-0003Hu-DU for emacs-devel@gnu.org; Wed, 28 Sep 2016 14:37:36 -0400 Original-Received: from mout.web.de ([212.227.15.14]:56978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpJjX-0003Ha-3e for emacs-devel@gnu.org; Wed, 28 Sep 2016 14:37:31 -0400 Original-Received: from drachen.dragon ([90.186.2.35]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0MVcvn-1bQx5N11Ml-00Z19P; Wed, 28 Sep 2016 20:37:26 +0200 In-Reply-To: (Stefan Monnier's message of "Wed, 28 Sep 2016 14:25:12 -0400") X-Provags-ID: V03:K0:HCCTOKdOzSTSOVzmZ41mc/EkjCVqo+uuZJs9NmaWcqXZc337ITO BuLt+FiL79BM3Hvf7alkZp47wtZsI16UDpBZZKDkTggjjwFFFz92l4VstCEn13BYfZnmwCN msMPfpZ+nuDAm3JNqfJSJ/CPNwHp5x3+xJNjTH3VTBOLWLPrV1GEKR7eH/GmgFQOH8OZM0H pk5OyFI5Kuk4E8eXSsUZA== X-UI-Out-Filterresults: notjunk:1;V01:K0:+csOtuYmYko=:lhgNO7SQVRkStLHvKrhyt5 KkZS1nwmoj5GyvTC+YnKEN9Yr9z9eqrjhuhW0tQhohYn+WRyd9IeVv75YmUv5y2oebdDrHoFc AHsvI6ObRHwK+BN+Ah7aS96T4EOd9c/5PcNsvfJ148ct+2IZaCIv7HZWCVMxPhfz32xKmqZH0 0XF0Ty8aSogq9BE0bWZi1pHoUQB4SG56lGjdOZYK46DmOuc8cWtZ8uf1K7FBvfii18B1QUy5j wOdi80FQPV672mlyL0WH/TlFGArnCwO4jYZgzSuO1vSfQylrliFtKosZHfJ5POzaWBlEaK1Qv a1GIW7lhRuv2hJIutV0M6dEGiYPwkp2iEKeO5SvaUzfLeYdRQ6mNhci925MHpUqopIUqvgwk1 PZcHumsUntBDFUeZlVYt3obspqhh96h/uTtlFKRO7iStyq2oU1MN916N1dotK6lrQNcr9HzZX 4pw0WzJH/tzbghws9u8VqBhtP2nZuLKE3UPbjHqAqklVeSII6PkKtpF0oXQ9GHdCyx/Yk0qtZ JEhZPvjAqr6WBBnxleVjfs8KE7AiHzD7PNDTBJizKQoafa7RhHN1fZNemFQikCQkTbbS0ZcjF FNOm7+FCMLtfraW6VVY6POR676l+CR+m6xGczwDRgsV9DAL9IcNUZV82R440NqSOvh1K6UgGZ 5yzi+7crz+solPe9VvefIz+50Ky8QvnMppf9JcLXz+RYDpEfpiab0TCwvq/EorIoOj3SNC8MX aF7q7mjI0oE40q3B8Ox9TMRxCEdy7uo9mNiIoJMx6M7/FGnnbQrr1I4lqKZezAq64375QD75 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.14 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:207872 Archived-At: Stefan Monnier 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 > ((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.