From: Vasilij Schneidermann <mail@vasilij.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: Dealing with obsoletion warnings in non-core code
Date: Mon, 28 Sep 2020 20:34:57 +0200 [thread overview]
Message-ID: <20200928183457.GC1002@odonien.localdomain> (raw)
In-Reply-To: <83imbxlqc6.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 874 bytes --]
> What about something like the below?
>
> (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
from 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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-09-28 18:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-28 14:35 Dealing with obsoletion warnings in non-core code Vasilij Schneidermann
2020-09-28 17:32 ` Stefan Monnier
2020-09-28 18:16 ` Eli Zaretskii
2020-09-28 18:34 ` Vasilij Schneidermann [this message]
2020-09-28 19:00 ` Eli Zaretskii
2020-09-28 19:24 ` Stefan Monnier
2020-09-29 14:07 ` Eli Zaretskii
2020-09-29 8:21 ` Gregory Heytings via Emacs development discussions.
2020-09-29 8:28 ` Gregory Heytings via Emacs development discussions.
2020-09-29 9:33 ` Gregory Heytings via Emacs development discussions.
2020-09-29 13:11 ` Stefan Monnier
2020-09-29 14:11 ` Gregory Heytings via Emacs development discussions.
2020-09-29 14:46 ` Stefan Monnier
2020-09-29 15:36 ` Gregory Heytings via Emacs development discussions.
2020-09-29 14:55 ` T.V Raman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200928183457.GC1002@odonien.localdomain \
--to=mail@vasilij.de \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).