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: pcase: Semantics of atom QPATS Date: Wed, 13 Jun 2018 05:41:32 +0200 Message-ID: <87k1r3qro3.fsf@web.de> References: <87tvqbjwyf.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1528861221 1553 195.159.176.226 (13 Jun 2018 03:40:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 13 Jun 2018 03:40:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.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 Jun 13 05:40:17 2018 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 1fSwdt-0000HV-82 for ged-emacs-devel@m.gmane.org; Wed, 13 Jun 2018 05:40:17 +0200 Original-Received: from localhost ([::1]:59641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSwfy-00083c-Fc for ged-emacs-devel@m.gmane.org; Tue, 12 Jun 2018 23:42:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSwfQ-00083U-Up for emacs-devel@gnu.org; Tue, 12 Jun 2018 23:41:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSwfM-0001rn-36 for emacs-devel@gnu.org; Tue, 12 Jun 2018 23:41:52 -0400 Original-Received: from mout.web.de ([212.227.17.12]:52603) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fSwfL-0001rJ-Oz for emacs-devel@gnu.org; Tue, 12 Jun 2018 23:41:48 -0400 Original-Received: from drachen.dragon ([188.110.196.170]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lc8c5-1fucZ94Bu9-00jWHP; Wed, 13 Jun 2018 05:41:35 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 11 Jun 2018 10:09:37 -0400") X-Provags-ID: V03:K1:qw11+NgXRk/60ifmcSPReOIiGLdC85C30XuWvlTvbaxMcAJ4A60 hqMa7rR6MUbzTqcz+2/R8vBmCV5ZODt0o6zmyIPmoUS2KNO2YZ1l/Krfj0w5s/geM1CY+Qk Z/30LOD9P+3P0+j+jEFEdxY3PPJDqWem/BATQNobo8M+BzyMMOwKMdedeATpnfb+Xcd+u/5 5Gm12TCmKODP7x9FQVPCw== X-UI-Out-Filterresults: notjunk:1;V01:K0:UUca1slC5n8=:GKH6IUKlI+7NuSro6uWeGb J8gSK9PC4hOl7a4ubA8VemjtdUK5wzAHJLjM6kaz1iqdOieqBycL5rppLDlIjP0lD23scB1Lz UOMNmhFX/Lp087azHy6ndNxiMg+BzTDX9JWncgwsiYAMxMeNCuvCJpmzld7EdUT3pclwepjj4 PDknYo0WNpEpTWsTIvvODV+m04tmqZYOJzrKqtkB3QzMGqXruGtBCu1EnU2VwcMzgW8aXsuj0 cOXqSh2pgJujl2zXDhca2HxunTjR/PqcRoXvvQl4S0A0XDBHuaVrgezla4IRurT/UXzmHD9by yPDrUivHA08Vbwo6zNiUcpT7x7zfzKM+LB6h7Cjya2y/OcXV+MtZPMWjkTaEJmwZq0Bp8VgEl Qk63VLEaslUAwaXYROLnqkmp/9mfJk1TYddrQwh7owhyxYuWjoCFDbnNSjBdfbhde2rsqvKEJ cKiErj7Yb/X0l/LB1S8lnguHxJhryeEgZvRPC4mR0kPu6dLVr08RfBGx7SlDwxh6hZBc1FIqv 1nevUHTAtOQvTxuhrdTeLn3/zHYZcJhPzV4lm1/gZ7UgwTVw3MBr07Mtp9cDuDKC0N90YSQs8 xfW7xNMb8AWkk2KdeKQBZoUwKWvZEMaf0hoXDddyeOqeCtU6vBJS9L/lVGh29/L7cVHwYm+s7 3iTSDDoqGrz6+srNbY5KT60vXAHt2uhNBa9HwvKg65pbZxnc92hqVyC/CPDUXlrdj17E8qoiS OEjVIjR7fI76rr8Ig244rAOyDQl0vY7qzLPH/COgD/B+NOVpdmJiQ9U7rzgVoVvwWuOPQg6y X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.12 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:226277 Archived-At: Stefan Monnier writes: > Which is why I prefer signaling an error: it lets us extend the > semantics of ` without any fear of breaking backward compatibility. May I add a comment like this to clarify? lisp/emacs-lisp/pcase.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index d3e8899706..32c36ab2cd 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -981,6 +981,8 @@ pcase--u1 (app car ,(list '\` (car qpat))) (app cdr ,(list '\` (cdr qpat))))) ((or (stringp qpat) (integerp qpat) (symbolp qpat)) `',qpat) + ;; In all other cases just raise an error so we can't break + ;; backward compatibility in the future: (t (error "Unknown QPAT: %S" qpat)))) (provide 'pcase) -- Michael.