From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Code for cond* Date: Thu, 22 Feb 2024 22:04:22 -0500 Message-ID: References: Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4651"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 23 04:05:04 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 1rdLs0-0000ys-9U for ged-emacs-devel@m.gmane-mx.org; Fri, 23 Feb 2024 04:05:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdLrP-0005LG-7K; Thu, 22 Feb 2024 22:04:27 -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 1rdLrL-0005Ap-Dw for emacs-devel@gnu.org; Thu, 22 Feb 2024 22:04:23 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdLrK-0000ia-Ni; Thu, 22 Feb 2024 22:04:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=A8EhWEySujWZFhCLK009i2PLLCbZ0MuKMOfLgjRqMVM=; b=eiQeynzUNzN/ G22zzlAHvQCWjTotqin3qMUkjVMN4BeOzrqi9en1cW9htklsMsIy4TomXZDhj5ycLdy0r1caZHBbt WvUe3BUax1UwOS5pwW0Iu1ukYCwh3kacGEJRS8FAnVpiCni8JsWM0Jsm+MTho2r4kciCs20m+wnvK qeXSgLvf4oTcDvcLZad+nY3sGvbOA2m8m6DmP42v8xKMPRtpWRKxwNZojNkKWpKHk3fq727xEjs1g MaYMHEMXCCBwW66C2GGW7KBVvhxv4on/Zz2qyEiLSXGWB+oXG9OWDQ1arXs9qdhNq0YzXYcDzwLpg woiT20fN5ftKXI/xuTiTCQ==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rdLrK-0004w2-DC; Thu, 22 Feb 2024 22:04:22 -0500 In-Reply-To: (message from Stefan Monnier on Mon, 12 Feb 2024 19:41:12 -0500) 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:316460 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > Your syntax (FUN VAR ARGS...) has two disadvantages in my view: > - It fixes the argument to be checked as the first argument. > - It does not syntactically distinguish the VAR from the normal > arguments, making a bit too magical for my taste. I think this is not a real disadvantage. The more general kind of constrained variable, with `constrain', does not have those two limitations. The simple version variable, (PRED VAR OTHER-ARGS...), is an abbreviation which handles the usual cases in a very convenient way. For the cases it does not handle, just use `constrain'. The special nature of the first argument is something that users will get used to as they see many instances of cond*. > Of course, there remains the question whether this usage should be the > one that gets the privilege of not needing a dedicated "keyword", i.e. to > allowing using it without the surrounding `pred`: > (FUN ,VAR ARGS...) If this syntax is easy to implement and doesn't cause difficulties, I'll go along with it if people prefer it. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)