From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.devel Subject: Re: Replace trivial pcase occurrences in the Emacs sources Date: Wed, 24 Oct 2018 09:08:43 -0400 Message-ID: References: <87oad2irtd.fsf@fencepost.gnu.org> <5689456A.1010601@yandex.ru> <87egdy8tyz.fsf@fencepost.gnu.org> <56895FDE.4060406@yandex.ru> <8760za8r4a.fsf@fencepost.gnu.org> <87h9iunkcg.fsf@web.de> <87h8hc4xw2.fsf_-_@web.de> <83tvlcsnee.fsf@gnu.org> <20181024083423.GA13100@Swift> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000bff7c00578f93120" X-Trace: blaine.gmane.org 1540387443 31968 195.159.176.226 (24 Oct 2018 13:24:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 24 Oct 2018 13:24:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: monnier@iro.umontreal.ca Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 24 15:23:59 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 1gFJ8h-0008DJ-3s for ged-emacs-devel@m.gmane.org; Wed, 24 Oct 2018 15:23:59 +0200 Original-Received: from localhost ([::1]:48401 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFJAn-0007Hl-KJ for ged-emacs-devel@m.gmane.org; Wed, 24 Oct 2018 09:26:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFJ4U-0000n7-4z for emacs-devel@gnu.org; Wed, 24 Oct 2018 09:19:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFIui-0005Fq-N2 for emacs-devel@gnu.org; Wed, 24 Oct 2018 09:09:36 -0400 Original-Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]:38734) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gFIud-0005Bw-4a for emacs-devel@gnu.org; Wed, 24 Oct 2018 09:09:28 -0400 Original-Received: by mail-oi1-x22a.google.com with SMTP id k19-v6so3998159oiw.5 for ; Wed, 24 Oct 2018 06:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KzIZdXN/b0k0b+Jb0E43qZ0LhyjRoWnWiN0GaGpWiW4=; b=A3xWSF1IchE+PGr8FEjQmOn4nwPkK623FI4zABBqhRqludtfxkg827/Upv41vaU+fg dpVRrgxMQuKcsMrH/hrxwZ9yUhgPuOs0Af5Au1QMZVA8JQnVJ5adZWm++OpWtTK/kx1q o8Bk0EcNftZ8uxJNqcQLyhi3RM1e2ge6CLAscHMcUJmCboJ5hTU/pCzsfb7oH56LkMfK aarggC/djAPYmQ3ud8qblExufYbywu1PEoEsZs+wgojEtWrEu7TleVQwsUlw6VVa6WXh FM8sA3mcQQWtesGobiXnKbMwWnrJ/1OlxaCL2IbHaDc4to5HK4Wfy27irzeznv5E6kTi Jv2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KzIZdXN/b0k0b+Jb0E43qZ0LhyjRoWnWiN0GaGpWiW4=; b=NzW9M2FKb03XjkX2TDIefblwaSYROHcT3F6VfHpvsQIj4Qj6vKrfhDGY+IZQcrcvhL ueHHqE3Jn032n0eCfP74ElYBwhyfERnBgCL5kJUGC3E+gWwCJ3L3M5qv5SdLAY99ORow t4LI1CkctfKrM7XfMS/DDN2/NlzFWBbWRQ4CcS+ibrfu2/w22boDuthGmWFGlZJp8Nue sf5kv/cTi8/ukVeEHZlta5DJWhOAW4OI1xCOPGssTfjerltt2CvG6GtClCKWkU7Yy9bw RgX+lmu4Boj1UBZB1Ui6fGRtMQdgaPI39uKbl3gGy/nQmEGVCTvT6nnk6FRI2qbSS8tE m8+g== X-Gm-Message-State: AGRZ1gIcrqeUDbpHSYPvP2d+k/P8RBbQSLW743jLzyMZBtScoSyaLVYC 9SU+jlxirPVyOlv0FAJOkmIzBT6yekUvUnL+vVFtx6cDqvI= X-Google-Smtp-Source: AJdET5d0zx1lscZu4nkAfz2oBgdLeaczZ0nlz1+iSwVjjK/UNrzW57Dt344+AhonwHpguwDL6ifRT30aeDEbKJsNniw= X-Received: by 2002:a54:4f89:: with SMTP id g9-v6mr1300419oiy.214.1540386560374; Wed, 24 Oct 2018 06:09:20 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::22a 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:230626 Archived-At: --000000000000bff7c00578f93120 Content-Type: text/plain; charset="UTF-8" On Wed, Oct 24, 2018 at 8:38 AM Stefan Monnier wrote: > >> > In what sense is the above cl-case more clear than the pcase > equivalent? > >> > I'm not saying the pcase version is better in those cases, but I > think > >> > the respective advantages and disadvantages pretty much balance out. > >> I also wonder. Is it simply that people find pcase unfamiliar? > > > Well, I can't speak for others, but personally, though I find pattern > > matching as a concept straightforward and intuitive, pcase syntax > > seems unnecessarily complex and unintuitive. > > Joost, could you post this in another thread? You're discussing > destructuring pcase patterns, whereas this discussion is about cl-case > vs pcase, where there's no destructuring and no backquote in sight. For what it is worth, I agree with Joost, and I thought this *was* the required syntax for the use case being discussed. Which, despite having written a fair bit of pcase and pcase-let based code recently, probably tells you a bit about the learning curve for the tool. --000000000000bff7c00578f93120 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Oct 24= , 2018 at 8:38 AM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>>=C2=A0 =C2=A0> In what sense is the above cl-case mor= e clear than the pcase equivalent?
>>=C2=A0 =C2=A0> I'm not saying the pcase version is better in= those cases, but I think
>>=C2=A0 =C2=A0> the respective advantages and disadvantages prett= y much balance out.
>> I also wonder.=C2=A0 Is it simply that people find pcase unfamilia= r?

> Well, I can't speak for others, but personally, though I find patt= ern
> matching as a concept straightforward and intuitive, pcase syntax
> seems unnecessarily complex and unintuitive.

Joost, could you post this in another thread?=C2=A0 You're discussing destructuring pcase patterns, whereas this discussion is about cl-case
vs pcase, where there's no destructuring and no backquote in sight.

For what it is worth, I agree with Joost, and = I thought this *was* the required syntax for the use case being discussed.= =C2=A0 Which, despite having written a fair bit of pcase and pcase-let base= d code recently, probably tells you a bit about the learning curve for the = tool.
--000000000000bff7c00578f93120--