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: Sat, 03 Feb 2024 23:46:29 -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="18953"; 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 Sun Feb 04 05:46:54 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 1rWUP8-0004k1-IB for ged-emacs-devel@m.gmane-mx.org; Sun, 04 Feb 2024 05:46:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rWUOk-0002A4-Ma; Sat, 03 Feb 2024 23:46:30 -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 1rWUOj-00029i-Vm for emacs-devel@gnu.org; Sat, 03 Feb 2024 23:46:29 -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 1rWUOj-0001SE-Nh; Sat, 03 Feb 2024 23:46:29 -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=aZRVHQ9KpOJWLEDcg+R+8mdgNIWfgvoFeNe9n6bf+Iw=; b=dKi2pEUtUNW7 F/AqoOfx9/aZA811SYDH3qLsGXR0N/EO9uRnftKzK3NGE4ysDCy5g4Ea2YwiPzOPRk7EsWwuENh5t hggK5i7g6I9l6sp674IXsDAoGjGGmaeH6kVxdymVpWf+sJYB936Dubdq70I41dVXH+1V6Ocng5T4W K+XuKL1TyAtxBbcn6d/7AEial9hGzJmLkBed3Bn8RZqmfLeb7wNuKPZJ5mCBNn0kCrKSkI+pTfba7 JR5qhjPUPwGC8MONXQs3NkXwZRly/aiUuk89JsIrp/yptUqwwoiWXYN+DL4Y/YkOz85gN+dZDhC2A cb//jXV68olELLq5RZOB5A==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rWUOj-0000l1-6k; Sat, 03 Feb 2024 23:46:29 -0500 In-Reply-To: (message from Stefan Monnier on Sat, 03 Feb 2024 01:09:26 -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:315851 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. ]]] > I don't think so. The primitive patterns were carefully chosen so it > shouldn't be needed. E.g.: > (pcase-defmacro constrain (symbol exp) `(and ,symbol (guard ,exp))) You're talking about one of the two kinds of constrained variables -- the more compex and general kind. The simple kind is (PREDICATE VAR OTHER-ARGS). I am pretty sure a simple macro facility can't handle tha because it isn't identified by pne specific symbol at the start, > should `(constrain x (null > (cdr x)))` be ignored if it appears within a `cdr-ignore`?). It affects only the built-in patterns that destructure cons cells and lists -- 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)