From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: Re: Why have a #if .... #else .... #endif construct in Emacs Lisp, when we could make the existing code DTRT unchanged? Date: Tue, 5 Sep 2023 06:37:13 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wLGZQzi2+uiyP+GO" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36637"; 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 Sep 05 06:38:24 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 1qdNpY-0009Lg-DH for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Sep 2023 06:38:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdNod-0002jU-4u; Tue, 05 Sep 2023 00:37:27 -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 1qdNoa-0002jE-0u for emacs-devel@gnu.org; Tue, 05 Sep 2023 00:37:24 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdNoR-0006ua-KW for emacs-devel@gnu.org; Tue, 05 Sep 2023 00:37:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Ti2MeuPBZrjfU1Ag39hfmSvtbXyWjlhr3bXC3J+wQa8=; b=T5sFfnXEiIrHIzjtg/M9Yf+fB8 8DcdsuZ4x9ktOsEnFIyGUMYRvZcbrNMBtBrk3YTq/UHUri3uRB3k5f6z8ABrZKsmY26+4lQjKUeQc 19ydK3wYuTW3JWJDD9oJTRA5SIPmehjm3EbICnPk/xsyg27CVk/6izLoz2MZ/6BAQSwtML+SuGhqT /2s3gvZPlOeZxSqz2X0b60muuxTJuM/eGE09dNYi+wYwsQiH1dLPiJPpT0M2b5HQsYLnMPb6+Iclf Yx7DPJ4DjMvokL7xkszfy+7KJOYP7ZdO115iyk3UdnWfIyP+C+sUP6E8Sfz6Ep+z0Dh1D+5I8eCVk etrHDpgQ==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1qdNoP-0005uV-6P for emacs-devel@gnu.org; Tue, 05 Sep 2023 06:37:13 +0200 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.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_NONE=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:310109 Archived-At: --wLGZQzi2+uiyP+GO Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 04, 2023 at 08:30:25PM -0400, Richard Stallman wrote: > [[[ 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. ]]] >=20 > > How about making the byte compiler recognize the construct > =20 > > (if (< emacs-major-version NUMBER) ...) >=20 > > and do this optimization on it? >=20 > People seem not to have considered this seriously, but I have not seen > any serious discussion of a drawback. What flaw or drawback do people > see in it? It should optimize the existing the existing code with no > change at all. Isn't that just perfect? I did offer one: checking for a version number is actually a placeholder for the feature your code cares about. Better be up-front in the test and let the reader know what your code's needs are. Cheers --=20 t=20 --wLGZQzi2+uiyP+GO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZPawcgAKCRAFyCz1etHa RgMxAJ9pfdhuPD0RlEWq6jkgfgdAISqXGQCggC0ZmaSkcGT+lMdnOnAk6ex1EK8= =Raa+ -----END PGP SIGNATURE----- --wLGZQzi2+uiyP+GO--