From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp? Date: Tue, 29 Aug 2023 09:19:22 +0000 Message-ID: References: <87zg2bosf3.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39311"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 29 11:20:40 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 1qautq-000A0E-Ob for ged-emacs-devel@m.gmane-mx.org; Tue, 29 Aug 2023 11:20:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qausn-0005U6-PB; Tue, 29 Aug 2023 05:19:33 -0400 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 1qausm-0005TJ-F5 for emacs-devel@gnu.org; Tue, 29 Aug 2023 05:19:32 -0400 Original-Received: from mail.muc.de ([193.149.48.3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qausi-0003a4-C6 for emacs-devel@gnu.org; Tue, 29 Aug 2023 05:19:32 -0400 Original-Received: (qmail 27104 invoked by uid 3782); 29 Aug 2023 11:19:25 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=muc.de; i=@muc.de; q=dns/txt; s=default; t=1693300765; h=date : to : subject : message-id : references : mime-version : content-type : in-reply-to : from : from; bh=Lx1+MyI+Y/WoiLV699pEVED8kDP0Jf597fMIem/j2vo=; b=U3ddRjEfdN9x7UlOOdddL53/8ygtM5zGDgz1G/AnW79jLq3TMHeWJXfstF8o7CM005qFh fVgCgBdY+pum/K//S8EWJrcVDU8+bhtPI8RQTAdMpbghLu3WN+OdObKLn0q46ON9Q6wtm7C y9XLe8f98O4tbwfVio9QFSTJ6Rfw4DHJcB0ltxHTX1stXSz8GIrOa2bJB6SoDVIIgtxmvj+ UVSzzBgo6UDp3UJmo8hhS49qsBbDsoWKUSlLHz1yyLj4A5NR79FtloBH9aLSDuDxUj2OvJL x6cu0G1d6VJ9br8bSvoiIx69A3yTVcKTruga2NiJiS9jHAIl+D98M9QdsUOA== Original-Received: from acm.muc.de (p4fe15a05.dip0.t-ipconnect.de [79.225.90.5]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 29 Aug 2023 11:19:23 +0200 Original-Received: (qmail 15431 invoked by uid 1000); 29 Aug 2023 09:19:23 -0000 Content-Disposition: inline In-Reply-To: <87zg2bosf3.fsf@dataswamp.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.3; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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:309482 Archived-At: Hello, Emanuel. On Mon, Aug 28, 2023 at 21:53:04 +0200, Emanuel Berg wrote: > Alan Mackenzie wrote: > > In C, we have the very useful conditional compilation > > directives introduced by #if or #ifdef, etc., which end at > > #end. > Those are directives to the C preprocessor and some people say > it is a sign of weakness such a thing is even necessary to > begin with. I think these people tend to be those living in an ideal world rather than the real world. > Let's see if they are right! > What problem do you have? The one I outlined in my original post: the use of obsolete functions/variables inside conditionals which ensure they only get called/referenced in older versions of Emacs. These obsolete objects are getting needlessly compiled in the master branch, giving rise to lots of irritating warning messages. It's a problem which arises in packages rather than in the core. > If we can solve it in Elisp, we cannot say those people saying that > are wrong. My proposed solution is in Elisp. > -- > underground experts united > https://dataswamp.org/~incal -- Alan Mackenzie (Nuremberg, Germany).