From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Replace trivial pcase occurrences in the Emacs sources Date: Tue, 30 Oct 2018 11:05:55 -0400 Message-ID: <9bfd9d19-3b6b-57cd-50a0-24660707768b@gmail.com> References: <83tvlcsnee.fsf@gnu.org> <86mur137n8.fsf@gmail.com> <20181029130132.GB4195@ACM> <20181029134722.GC4195@ACM> <83r2g8klf9.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1540911972 7791 195.159.176.226 (30 Oct 2018 15:06:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 Oct 2018 15:06:12 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 30 16:06:08 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 1gHVap-0001u0-Kl for ged-emacs-devel@m.gmane.org; Tue, 30 Oct 2018 16:06:07 +0100 Original-Received: from localhost ([::1]:53766 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHVcw-0004Ng-0p for ged-emacs-devel@m.gmane.org; Tue, 30 Oct 2018 11:08:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHVap-0003uV-71 for emacs-devel@gnu.org; Tue, 30 Oct 2018 11:06:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHVak-0000aH-TO for emacs-devel@gnu.org; Tue, 30 Oct 2018 11:06:07 -0400 Original-Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]:39400) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHVak-0000FA-J5 for emacs-devel@gnu.org; Tue, 30 Oct 2018 11:06:02 -0400 Original-Received: by mail-qt1-x836.google.com with SMTP id g10-v6so13819023qtq.6 for ; Tue, 30 Oct 2018 08:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=sy4h/lkjzcUtmtl6eG+saVcugOwYnfycxAgHV3iGHJQ=; b=Hr1cD02PKyEdqJIS//MxZiehPODIokcZOjm86w/IAZzwG04ukKEAeBE6ZzARcnWCaI yNFVeEix+7yQ9CbEQa8T1XGDZTYQ4SFVSFIHzbNpH+1XN4ohD3QstPpcCoKgOAIcCNFk G9HtzKuKSz3FKdADV8cOHg2+99CVY9Tu8sWHiSykozFkYa5GQO2Q5OoBHDCTtKNHImRb 4vuOjNyHk2G+vF0YvAO3x7uHPQ4kkxKZwM5xUAB+ID+2PwMvHotM8+uv6kA3X2MIrWh5 Qmp4IW6l+H2tVO/ZkjAprWeUy7St90FQfEeMZR3WwsUFdspj5P/kxZl3x4yYRTEAAUrJ de/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sy4h/lkjzcUtmtl6eG+saVcugOwYnfycxAgHV3iGHJQ=; b=D+jMT6NplrrA3FRuYZbiqAMDjcNnJ/Pw+0LZ1iXx/jXK8e8QG/as8EYPUbIqprXwkk Bca69xSno0oAtermcU5ZdFh8HUsLtp/1jTlSbS6KDcw33S/fRpimpU9Vz4ybvHf9MBYo R0rlIAqNVht8rk2jtu2gUhcnt6tHofgK4klcSaoGInac+fK4RiyEJytdbuVEHYE0dTOR zgHW4kLXqIlM4NONHkEBHSdfTngbhq+BmoUdRA8/1CWaUf+cBs5VYAD/+ANFA1jvPvdl mhDOgaaAmVyx5FhQkXzcUvSVdz/VK+opbm5rUSCGfJBOor/G/ee8yLsmVXKteS5bXrSG at7A== X-Gm-Message-State: AGRZ1gJKMPTO9nKvTYxi7oeRIp8Q2bIfh+QjC/86KtDc4fw3FjKeWeWi N82oNoRsQeP7w6dSDtBz7MN03AxD X-Google-Smtp-Source: AJdET5fdsJTk9oxsFY7U8cJ//8Y7eIYRtaVT1suMrxltZxgajNxsOIYPzOdxDp5HT3VKQAFogHTKkA== X-Received: by 2002:a0c:d6ca:: with SMTP id l10mr17494054qvi.213.1540911956252; Tue, 30 Oct 2018 08:05:56 -0700 (PDT) Original-Received: from [18.26.2.123] (26-2-123.dynamic.csail.mit.edu. [18.26.2.123]) by smtp.gmail.com with ESMTPSA id o41-v6sm19578788qto.38.2018.10.30.08.05.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Oct 2018 08:05:55 -0700 (PDT) In-Reply-To: Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::836 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:230828 Archived-At: On 30/10/2018 10.16, Andy Moreton wrote: > How are users meant to write reliable code using such constructs ? Ensure that the pattern actually matches :) IOW, only use these constructs when it's an invariant of your program that the pattern will match the data. For cases in which the pattern might not match, use pcase instead of pcase-dolist.