From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] pcase.el: Add type pattern Date: Mon, 09 Mar 2020 11:45:40 -0700 Message-ID: <875zfd1i5n.fsf@ericabrahamsen.net> References: <874kuxxuez.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="73586"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 09 19:46:46 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jBNQM-000J3t-74 for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Mar 2020 19:46:46 +0100 Original-Received: from localhost ([::1]:48080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBNQL-00010i-AH for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Mar 2020 14:46:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43643) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBNPT-0008Bt-4J for emacs-devel@gnu.org; Mon, 09 Mar 2020 14:45:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBNPS-0008Fc-07 for emacs-devel@gnu.org; Mon, 09 Mar 2020 14:45:50 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:54920 helo=mail.ericabrahamsen.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jBNPR-0008Bg-SX for emacs-devel@gnu.org; Mon, 09 Mar 2020 14:45:49 -0400 Original-Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 38CE1FA02A; Mon, 9 Mar 2020 18:45:42 +0000 (UTC) In-Reply-To: <874kuxxuez.fsf@alphapapa.net> (Adam Porter's message of "Mon, 09 Mar 2020 13:19:48 -0500") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 52.70.2.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245399 Archived-At: Adam Porter writes: > Hi, > > It seemed like an obvious and useful improvement to add a "type" pattern > to pcase, so I prepared this patch. I wondered if checking for > predicates like this was a good way to do so, and I saw that the > cl-typep inliner does basically this, so it seems reasonable. One thing that's nice about cl-typep is that it will correctly identify instances of subclasses, which can be nice. Dunno how difficult it might be to work that in there, but it's something to consider. Either way this is a nice addition.