From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Instead of pcase Date: Thu, 16 Nov 2023 20:49:06 +0200 Message-ID: References: <87fs169mjj.fsf@posteo.net> <093f11a1-57c2-5e56-d39b-26fef1c67cbb@gutov.dev> <25942.25061.217864.329049@retriever.mtv.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="389"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: philipk@posteo.net, rms@gnu.org, emacs-devel@gnu.org To: "T.V Raman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 16 19:49:36 2023 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 1r3hQl-000APf-H3 for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Nov 2023 19:49:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3hQW-0002dT-2A; Thu, 16 Nov 2023 13:49:20 -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 1r3hQP-0002cx-7H for emacs-devel@gnu.org; Thu, 16 Nov 2023 13:49:14 -0500 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r3hQN-00083V-Cm; Thu, 16 Nov 2023 13:49:12 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id B1BF25C027D; Thu, 16 Nov 2023 13:49:08 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 16 Nov 2023 13:49:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1700160548; x=1700246948; bh=+RlZclmyGs9YXturfnPMVblRDFE/3EDYZBl f2zzITJk=; b=IBv9alpv2UB3hf6PhD8pay22bUwRFrnkHpe5dwx2nU208HOv1rv N/5/tnpwEKyDtifhbFdufFivYbvFpAT1oy+2VPhbHxhzGySyFApUSC5UkEJFu+QY 3n8BIvNBdpe8JknPlZTPJ9fVCsq3WEeD9FrMsnI6gR6HM0gzy/7JVL47Q1p0zgYE 58hItb5VqrAFgDArL7PLkSZUz67amaMEczB89J/imtF+TZvyeSE/cxVtrvuqzQHj YM5ZjLdqUkhB3dGzLYSC8DtxEWxvg3viPjkyUnxdebK7UFVJ3wXk/H5x6REieE58 LUBQXVlO1AUBLd+/H9Mp4O2b2KJDz0FeTSQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1700160548; x=1700246948; bh=+RlZclmyGs9YXturfnPMVblRDFE/3EDYZBl f2zzITJk=; b=W3/iREw+i78dzrykNfGk/aNKheGcIZKbqvQV64PgaXdskg4u0Ix kmBoysbavAQcFEsqZcVi3q3Ye5YSXIWcyr0GaH6ajVJToGuoJD4ukus8lQN+WOKo GFW+BxkYb9GeIg7vsI0e3oy3m3bOT6m2i+jUSxA2R0CNBUFm8ndPlNSsoPCZmn09 RiFyu14KyRaCuPJOZtXyuYqqv05cMKBIPKKHCWi7NkfW3E9G4Yzgd6AmgaEESgsX 0tvexqjtvhxd2A/S0H2q/RdLNG0XfaKnldWpJo5/nSjupFXMXRUK9HrGnFM60ph/ oVUcLm1nDQL+jcsbbyhuSYvvlAHBbN+h3ZA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudefkedgudduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Nov 2023 13:49:07 -0500 (EST) Content-Language: en-US In-Reply-To: <25942.25061.217864.329049@retriever.mtv.corp.google.com> Received-SPF: pass client-ip=66.111.4.28; envelope-from=dmitry@gutov.dev; helo=out4-smtp.messagingengine.com X-Spam_score_int: -49 X-Spam_score: -5.0 X-Spam_bar: ----- X-Spam_report: (-5.0 / 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, NICE_REPLY_A=-2.193, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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:312829 Archived-At: On 16/11/2023 20:39, T.V Raman wrote: > when-let let-alist etc have worked well for me. when-let is not destructuring. let-alias is very limited -- destructuring only for one type. What I meant is there are similar constructs in functional languages like ML/Haskell which have also been available lately in Python/Ruby/Rust, that allow both matching and getting the data out in the same construct, accepting many or all data types available in the language. pcase is an implementation of that idea. Perhaps it looks a bit cryptic, but I'm not sure what better syntax it would have in Lisp, while retaining the same capabilities. > What threw me with pcase is there are lots of special chars in that > particular example whose meaning I dont know, and looking those up and > understanding their use at the same time was what chased me away Perhaps (info "(elisp) pcase Macro") will help?