From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bob Rogers Newsgroups: gmane.emacs.devel Subject: Re: Re: cond* Date: Sun, 24 Dec 2023 17:32:06 -0800 Message-ID: <25992.56214.508459.273816@orion.rgrjr.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37690"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Richard Stallman , Pedro Andres Aranda Gutierrez Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 25 02:33:28 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 1rHZqS-0009di-PA for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Dec 2023 02:33:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rHZpF-0004qa-Vg; Sun, 24 Dec 2023 20:32:14 -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 1rHZpE-0004qQ-Hi for emacs-devel@gnu.org; Sun, 24 Dec 2023 20:32:12 -0500 Original-Received: from mail-oo1-xc35.google.com ([2607:f8b0:4864:20::c35]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rHZpD-0003Cv-4g for emacs-devel@gnu.org; Sun, 24 Dec 2023 20:32:12 -0500 Original-Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-594019698b8so2555325eaf.3 for ; Sun, 24 Dec 2023 17:32:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rgrjr-com.20230601.gappssmtp.com; s=20230601; t=1703467928; x=1704072728; darn=gnu.org; h=references:in-reply-to:subject:cc:to:date:message-id :content-transfer-encoding:mime-version:from:from:to:cc:subject:date :message-id:reply-to; bh=/lKYbNwOcGYJvKlJ/T9e52w69f1qL+oOQ57yFbROT1Q=; b=VDSw03kAFzLTN9JnzMaTzyWhfOB+IE1D/Ngvby1EAaG5uhLOBMtDDaPiVYETusGgYY KdHAbNf+R+TMberdmOwzX95dNQtnGuj3pnu3tMyyhm+EzPjynUAPWp+VjCIbUD2OtC5B yt6xjHaE/b4/rphyHt4jBFXVTq/gPPS33yOAjtcNyBykFptnPipkyVthHGnP2SVHGJrC xPRj9s9Mx0e9V4oAQprdksdnMQFsFcwQcVrTt/spNPibbrctwC97ntGx/xlh2ppRAkpX bSVtuFgoxjaggkdZwkkCgqJjiepDuOdbFenujMQfxTKO/BBZiqL5dmpAbOEDooLgqZxs iUcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703467928; x=1704072728; h=references:in-reply-to:subject:cc:to:date:message-id :content-transfer-encoding:mime-version:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/lKYbNwOcGYJvKlJ/T9e52w69f1qL+oOQ57yFbROT1Q=; b=R7sTtU4sVRCMkkSOHs39/rWfBOhmqo8m6fZjI9vhAJdirIRx3W8VFZ2qFa79tcGwHY 2tSaXUmxd6gDt+w4kQjATd2hpyikFkjubImwDq+4fZ9xdss0qZ9gRi4QmXsfGD4/2wHv JHcPtXyPP4//HtsuAIM2eKTnPlfC294bQEN7y+YEQnTl92/iR+cHk0v91M77oG/g8nz4 rMseZ7IXBvDRboXEamOVnBOi6fM8eMoo0vovqYFzdT6APACdQP+d3ahBBvF4g9XTkcLh OAAJMTP8Ke43vkiPuqLH9DRgH4s9VhdO2H116fRjv2bRoj2QBGwHQr6UmXapYy+FqKTd DU4w== X-Gm-Message-State: AOJu0YydNkhJU63UDRrTqSPOEQ/AWCUvewTqZxmkCqh7xa7R5DE6j1Lv wGdmIAEtNqgy7oY38KxQ8zHhB6jcFRzOuw== X-Google-Smtp-Source: AGHT+IF2PfZWkQRMhQw4xYFuC/K6AHWhG1Q8dWRmhC+RHHGQ7kgDwIMOp2FsildNo0LJgfo9N+XEyA== X-Received: by 2002:a05:6359:6c8d:b0:172:cd62:f1c5 with SMTP id td13-20020a0563596c8d00b00172cd62f1c5mr4239656rwb.33.1703467928569; Sun, 24 Dec 2023 17:32:08 -0800 (PST) Original-Received: from orion.rgrjr.com ([2600:1700:7c2c:e000::22]) by smtp.gmail.com with ESMTPSA id u1-20020a170902e5c100b001cf658f20ecsm7083121plf.96.2023.12.24.17.32.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Dec 2023 17:32:08 -0800 (PST) X-Google-Original-From: Bob Rogers In-Reply-To: X-Mailer: VM 8.2.0b under 30.0.50 (x86_64-pc-linux-gnu) Received-SPF: none client-ip=2607:f8b0:4864:20::c35; envelope-from=rogers@rgrjr.com; helo=mail-oo1-xc35.google.com X-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, NICE_REPLY_A=-1.463, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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:314196 Archived-At: From: Pedro Andres Aranda Gutierrez Date: Sat, 23 Dec 2023 07:17:09 +0100 Richard writes: > Fall-through clauses are an important feature of cond* and a big > advance in flexibility. Precisely how to indicate one is a detail, > and I've proposed three ways to design that . . . Hi, wouldn't a clause starting with t be the most natural choice? Just because it would mimic cond and make things consistent. My .02cents, /PA I fail to see how using "t" is consistent with cond. Syntactically, perhaps, but cond uses "t" to indicate an unconditional final test. Richard is looking for a syntatic indicator for a fall-through clause, which is the exact opposite thing semantically, a sure-fire source of confusion IHMO. In fact, none of Richard's "three" options strike me as truly palatable: * A clause with one element. This seems to be Richard's preferred option, and I can see the appeal, as it is simple, but it would be easy to miss, and is also unlike the corresponding cond semantics. * A clause that starts with t. This is a big semantic clash with cond, as already described. * A clause that starts with nil. Possibly confusing, but at least it could make people realize that there's something subtle going on here, and maybe they should do C-h f before proceeding. * A keyword. Perhaps the ugliest, but it has the advantage of being the most explicit about saying what's going to happen. Personally, I prefer the keyword, but for the sake of full disclosure, I'm the one who suggested it (at the end of the clause, though). As further full disclosure, I don't use pcase, and haven't really had to learn it, so I doubt I'm going to use cond* much, if at all. So you don't need to give my opinion much weight. However, I did want to point out what I thought was a severe drawback of using "t", since no one else seemed to have noticed. -- Bob Rogers