From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: Instead of pcase Date: Mon, 8 Jan 2024 21:36:18 -0800 Message-ID: References: <87fs169mjj.fsf@posteo.net> <093f11a1-57c2-5e56-d39b-26fef1c67cbb@gutov.dev> <25942.25061.217864.329049@retriever.mtv.corp.google.com> <87zfzdcz6z.fsf@posteo.net> <763f067b-4ca9-1eba-9f3c-424c38589e9c@gutov.dev> <83fs0navpj.fsf@gnu.org> <838r6ebfhw.fsf@gnu.org> <83msuu9m2y.fsf@gnu.org> <83il5i9e49.fsf@gnu.org> <241fce6d-fbb6-aa7c-b0b5-5a654eec023d@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27287"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , owinebar@gmail.com, rms@gnu.org, philipk@posteo.net, emacs-devel@gnu.org To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 09 06:36:50 2024 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 1rN4nC-0006tD-Tb for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Jan 2024 06:36:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rN4mq-0005Tt-0V; Tue, 09 Jan 2024 00:36:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rN4ml-0005Tf-51 for emacs-devel@gnu.org; Tue, 09 Jan 2024 00:36:23 -0500 Original-Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rN4mj-0001N0-CK; Tue, 09 Jan 2024 00:36:22 -0500 Original-Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-557dcb0f870so1255003a12.2; Mon, 08 Jan 2024 21:36:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704778579; x=1705383379; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=1FAh5VAhHCL/q4sdQPGTFkBRKAI8jWCULnfz5TKBIcI=; b=YSsw7bUjHC+yKpbmUSTEBMIkKC1geW9mDilGAnoz+nreXXlaLyNv9fdfU/52Gx2Hnz ysm/vBRX3o5zEYe/+wQ5uwGyikucYAnsnEYwd/04Q4uV3ddgEEqjIt5MMwBPwuENTGl9 Smc/sT6jjoGDH7yjFoOVW8g7CRp7/wlqhTWcRxA71SXs83WCXPV2ySxLU0O05+31qHs0 v95JIIG3VncF4/ZyJSidbNToKHXeqrlFyZmsPmdpSLilVpL4rOouvsFjA8hlb9NHiPjM DdKgywKGr+ED521eSquR9dpt0C6tYQgfuZi/1cMIBOUX8BF+dSsZlowJEqdStxG65+nP JRBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704778579; x=1705383379; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=1FAh5VAhHCL/q4sdQPGTFkBRKAI8jWCULnfz5TKBIcI=; b=X624MXgOynoF5NR0kvWB8crRhlpVajYBIzaE/wNTReUnXL5FA6g6gwvrNSB77VOsv1 obCZqmd+dV/dJDtD+emvn9VyJOg7ZJQj2pNhondO4LR6Qv7+uFyo2vqdwCJ+ZizOt3cl 2w9mhuLkbvtIOCHAoeXJBsSEmGe7j/IuXTl4IJPjTpry5vRwmsya/4mAttQsEPNB0XtK 4AKxr5BH3kNEuQUz5EqcdvB+JuqyiwbSqvONDNLjns5cbsOyb63jy+Fy6fEs7x1diDRq mpvQTLuL6HuwW/iwkWUgnDzC8ZG+Aen1Ho9j4wZRS9bPL7A9mCHO0exJ2AXGmjUjtcXP jxgg== X-Gm-Message-State: AOJu0YzXabu6MhDo9pRyPBBLCsv9//JkaQr/JiapUL83f6zqc/YJLhYh bc6on4vXbmkNoIoTJ+Wzo3AUxJuOvrOo0f/SbEw= X-Google-Smtp-Source: AGHT+IEDEIqfUV7qUV8SAFMSnYwX3mwOcdVkfzjgLVoaVcF4EQoA/crylMAnLo23UAr2jGBPRHkpaMmhLPe4dEYbTMc= X-Received: by 2002:a50:ab0e:0:b0:557:6ca4:1190 with SMTP id s14-20020a50ab0e000000b005576ca41190mr2328780edc.77.1704778578892; Mon, 08 Jan 2024 21:36:18 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 8 Jan 2024 21:36:18 -0800 In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=stefankangas@gmail.com; helo=mail-ed1-x52a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:314773 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > On Fri, Dec 1, 2023 at 6:28=E2=80=AFPM Dmitry Gutov wr= ote: > >> That just reaffirms my understanding that the main problem with 'pcase' >> that we have is documentation. The nodes are written very bottom-up, >> whereas what's really needed for someone to understand the core usage, >> would look more like the first half of the node "Destructuring with >> =E2=80=98pcase=E2=80=99 Patterns". > > +1 > > Instead of "11.4 Pattern-Matching Conditional", that section could > be called "Pcase and friends" or "The pcase family of macros family". > > Though it is original use of pcase, pcase conditionals are just one > of the things you can do with it, and in my recent experience, not > necessarily the most common or useful one. Also 'pcase-let' is > probably easier to understand than 'pcase', as it only does > destructuring and binding whereas the other macros do that and something > more on top. > > Besides renaming, that section could start with a 11.4.1 "quick-start" > with some brief explanation about how pcase relates to backquote-and-tick > and with an example for 'pcase-let', not unlike the one that surfaced her= e. > > If space allows, an example for 'pcase' that introduces the conditional > macro can be added. Please reformat this also as documentation patches and send to the bug tracker.