From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: Instead of pcase Date: Thu, 16 Nov 2023 09:31:27 -0800 Message-ID: References: <871qcpn3ep.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8138"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 16 18:32:29 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 1r3gE9-0001ss-H0 for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Nov 2023 18:32:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3gDJ-0001Qd-6K; Thu, 16 Nov 2023 12:31:37 -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 1r3gDG-0001QQ-Oz for emacs-devel@gnu.org; Thu, 16 Nov 2023 12:31:35 -0500 Original-Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r3gDF-0004j3-6b for emacs-devel@gnu.org; Thu, 16 Nov 2023 12:31:34 -0500 Original-Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1ce3084c2d1so9399345ad.3 for ; Thu, 16 Nov 2023 09:31:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1700155890; x=1700760690; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=BEVG0tuxUWg8cI4tlTV2f5C/dS27ie7d+xNyQ+ZOpig=; b=Esj70CmbA9ZPIiQzFQwiv0kXvPur147Olm+1kfmRKxRPi5ogS6lxHHXBAf/JZ7TICo lToOtbygku4lktcNl4n3YpaleUKT2U4KOSiqN6IcSnGJli69fmJ984kVix7Xuc+Exqwo /fj0aIMBBzp9r31Q1g8CryzDm2i3zQfJ0CQag0+grwxbTq7o4oyFhtqr6KK6D4P/Aj/A ATUM1fXtyPchcH1Lq5JNbT0H4QKc+QXZpmv+zmBOhDOrn3ArTMvTRv1b9tTiU3oAkKLz B31D4jLALrAufWtlwvEW8oXpizYtq+YW+rYOZZYvO5gsoR2D5YvcSyIeumDqum59f2wE HYMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700155890; x=1700760690; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=BEVG0tuxUWg8cI4tlTV2f5C/dS27ie7d+xNyQ+ZOpig=; b=CF/1CtR097aDb4NudaUvHFnXCmju2NkknTS5comL0QwisIA7hAzxypennsGDJGa1ZT r0pqFCpFWHDGavqCG3GRZAeaTRHbxIyk5rtna6mSon2CLAC0Tg2mLmAsO8CJtXyPQD1u 2TPH3UJbY8OqfLWoJk/ik5LsBlr3c47ujcnblBuOxEIz0An0jgjYrH9msS44rqwU21Ae yK7sUR+OsaGTtULnulr1XFf3j3Qw3uvFPGwIfSGxcX9IwAyR4K78WYz/+UC+RcteevJw cl+1/rmw38ozD0fYHw6WCfppeJ2HLv+d583yv3yLFN+2jHTCHVgnSvh31VsVJl5DJrUm je+A== X-Gm-Message-State: AOJu0Yx5sytDi6cXRKxvQVYqu/qjadX80JtsBMcSgbKl/iDZUgigzJV2 WSS3JIHdUEIvxM6bxANqzNCaDiVDxNjREAiplPLz/Q== X-Google-Smtp-Source: AGHT+IH3apEAh3SNu7zB5a0xz0+426LBwoWKm+Z2GnSBnDvHkE7ka3C0bkG9CfEP8JZprkOV+xUgKA== X-Received: by 2002:a17:902:f651:b0:1cc:6b55:fd3 with SMTP id m17-20020a170902f65100b001cc6b550fd3mr10070422plg.42.1700155889827; Thu, 16 Nov 2023 09:31:29 -0800 (PST) Original-Received: from raman9 ([2601:646:9e02:3290:b9ef:5be3:7e1c:49ff]) by smtp.gmail.com with ESMTPSA id s13-20020a170902988d00b001b567bbe82dsm9529002plp.150.2023.11.16.09.31.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 09:31:29 -0800 (PST) In-Reply-To: <871qcpn3ep.fsf@web.de> (Michael Heerdegen's message of "Thu, 16 Nov 2023 16:06:38 +0100") Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=raman@google.com; helo=mail-pl1-x62b.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 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:312815 Archived-At: Michael Heerdegen writes: See my other response re pcase and its use in emacs core; specifically completion-at-point. A good compromize might be for the pcase fan who wrote that code to explain its use just before the function with some comments; that would actually help someone looking at the code to understand it, and perhaps even turn a pcase sceptic into a pcase fan. > Richard Stallman writes: > >> What makes `pcase' such a complication is that it introduces an >> additional "little language" that duplicates the functionality of part >> of Emacs Lisp. Even worse, that little language is so concise it is >> downright cryptic. > > It is not cryptic per se. People are sometimes frightened by the > syntax, for some it seems to be hard to learn and understand, I don't > know why, but I accept that as a fact. > >> Those of you who are fans of `pcase' may not recognize the cost it >> imposes on the Emacs Lisp language. You paid that cost already, >> perhaps a few years ago, and perhaps you enjoy each new language >> construct you learn. Perhaps, for you, the more complexity of >> features to be learned, the better. >> >> But don't argue that this cost does not exist, simply because it >> doesn't feel like a burden to you. > > Hmm, I must say that cost was small for me. There is also a cost of > reading a more complicated rewrite using less suited language > constructs. And i have to pay the price each time I need to read the > more complicated rewrite, instead of only once. > >> I'm looking at adapting some of the features of `pcase' into other >> constructs, so as to make type-discrimination code more concise than >> in old-fashioned Lisp, but _not_ so concise as to be cryptic and >> burdensome. > > I wonder how that would look like and if it would really be simpler. Or > if it would be structurally more or less equivalent and only avoid the > concise syntax. > > Because, we need different semantic features, and we want that it's > possible for them to be combined. I think we would more or less end > either with `pattern-case' that is like pcase but more verbose, or with > something that is simpler, but when some requirement in the code > changes, like a destructering having to be made conditional, has to be > rewritten to use a more complicated construct, or plain Elisp. > > > Michael. > > --