From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Code for cond* Date: Wed, 14 Feb 2024 07:45:32 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9072"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 14 13:46:46 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 1raEf0-0002BQ-Em for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Feb 2024 13:46:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raEe2-00088S-1G; Wed, 14 Feb 2024 07:45:47 -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 1raEdx-00087u-2P for emacs-devel@gnu.org; Wed, 14 Feb 2024 07:45:41 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1raEdv-0004Ke-Bw; Wed, 14 Feb 2024 07:45:40 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2335A10005D; Wed, 14 Feb 2024 07:45:37 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1707914736; bh=ZutonlFPZzMJAoBrf7T9SS5Mf8sqIpzLIRYuR9avkCE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=k5Yb102k6g7o5APzo48bOA2NH1mj6Sk5cy65z/oBqV0Pb0/VI+o5OmoWWjAHDfiVC bHmKd4k+4P8wJC6mGVM50/Nnrd5mD9/0YN1jRNrIAeN6B7MQmtfviIbl/C6k1etRbF 7pHoIiD7s4DrJxIGDqFZzLZLXflwdq21jiF7/C/aZWFObgnVPC0AAKNR4f5tz4pSQP F6cOw9V3aGO/t/gwSgDKYVh16jahlW2JaaNpyBNSD0Fv8tCqPGja3KcKuObQ9RV316 dVfHM2REbJiVc61Oiy5DYZndpvJgrl3e7HMN0TU0V7Cjqbv/jxxfmE/fORv6KlcU+Q tdA0NqMPkqqUQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 1353F10004B; Wed, 14 Feb 2024 07:45:36 -0500 (EST) Original-Received: from pastel (unknown [45.72.197.152]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E4272120610; Wed, 14 Feb 2024 07:45:35 -0500 (EST) In-Reply-To: (Richard Stallman's message of "Wed, 14 Feb 2024 06:16:01 -0500") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:316200 Archived-At: > Its current meaning is the right meaning. I see fundamentally two decisions in the design: - Whether the "lax"ness applies only to the final cdr. - Whether the "lax"ness applies also to the (final) cdrs of nested lists. Any evidence to substantiate this wild claim that your choices (which answer yes to both questions, AFAICT) are The Right Ones? IMO, there is no right or wrong answer here, only answers which are more often or less often useful. I gave an argument why "yes" may not be the best answer. Could you at least give me some hint of cases you've seen where your choices are the ones we need? > I believe that it IS documented in these lines. > > (cdr PATTERN) matches PATTERN with strict checking of cdrs. > That means that `list' patterns verify that the final cdr is nil. > Strict checking is the default. > (cdr-safe PATTERN) matches PATTERN with lax checking of cdrs. > That means that `list' patterns do not examine the final cdr. I guess the "final cdr is nil" does, indeed, thanks. So it's not "all cdrs" it's "the final cdrs". It would be good to find a name that conveys this more clearly. Maybe `lax-list-ends`? Stefan