From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vasilij Schneidermann Newsgroups: gmane.emacs.devel Subject: Re: Dealing with obsoletion warnings in non-core code Date: Mon, 28 Sep 2020 20:34:57 +0200 Message-ID: <20200928183457.GC1002@odonien.localdomain> References: <20200928143540.GB1002@odonien.localdomain> <83imbxlqc6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="f+W+jCU1fRNres8c" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30528"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 28 20:36:49 2020 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 1kMy12-0007qw-7B for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Sep 2020 20:36:48 +0200 Original-Received: from localhost ([::1]:47316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMy11-0001BL-9x for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Sep 2020 14:36:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMxzZ-0000KM-AT for emacs-devel@gnu.org; Mon, 28 Sep 2020 14:35:17 -0400 Original-Received: from mout-p-201.mailbox.org ([2001:67c:2050::465:201]:63130) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1kMxzT-0001UV-Jc; Mon, 28 Sep 2020 14:35:16 -0400 Original-Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4C0WQt3KynzQkm4; Mon, 28 Sep 2020 20:35:02 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Original-Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id zi6u7e1ArEEt; Mon, 28 Sep 2020 20:34:59 +0200 (CEST) Mail-Followup-To: Eli Zaretskii , Stefan Monnier , emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <83imbxlqc6.fsf@gnu.org> X-Rspamd-Score: -5.01 / 15.00 / 15.00 X-Rspamd-Queue-Id: 6695317D9 X-Rspamd-UID: 7cc89d Received-SPF: pass client-ip=2001:67c:2050::465:201; envelope-from=mail@vasilij.de; helo=mout-p-201.mailbox.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Xref: news.gmane.io gmane.emacs.devel:256634 Archived-At: --f+W+jCU1fRNres8c Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > What about something like the below? >=20 > (if (> emacs-major-version NN) > (defun recommended-function (...) > ...)) You don't want a third-party package defining a potentially non-conformant version of future built-in functionality (for example if they take the definition from a specific Emacs version and it changes in another one). Users could mistake that for the real one. Shimming may be acceptable in a JavaScript world, but remember, they have invented fixes to lack of namespacing and modules and we haven't, so their damage =66rom a package is global. Besides, isn't the logic the wrong way around? The recommended function is something available in a newer Emacs version, so you'd test for an older one and if the check is positive, define the shim. Assuming you can even, some functionality cannot be backported that easily. --f+W+jCU1fRNres8c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEE0dAcySl3bqM8O17WFmfJg6zCifoFAl9yLMkACgkQFmfJg6zC ifo6XQf/bopb+/fl7vbzHb8a9jv1vvAcTlG43cNu5Q1/EbE8TLXjXHgK094IOojS h8UqaY4mMUiOXK5eDslLIAcI8nUdSmWkUoHWIsN7C64wwVLQwH+uqcJkREphDfCZ WLgTGD0xbCOfhsp7cQrTOAH8GlMOsX8yZkuezPAg2Hn9IfarSffvhEj590X6xDJp oab4xLGq5M+bO08tEg3j5JkoDDV+S7Dp7P8Bz0MLQ4jqIsaiRW42RyUnlk70OH9F clI3QRsJ47VZXld1Em9p/7gWBNQSg6Kkzjnr+SRndN9N6GtaFPNFKd8OIXE1+UCZ TC7cE9GcfI9coyO1QX+Vgpocjm1GhQ== =J3KN -----END PGP SIGNATURE----- --f+W+jCU1fRNres8c--