From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: string-to-unibyte in image-jpeg-p Date: Fri, 25 May 2018 16:39:06 -0400 Message-ID: References: <87zi0q3c5b.fsf@gnuvola.org> <87h8my5dq5.fsf@igel.home> <37c86fb0-8644-9a67-8762-7d716fc92242@cs.ucla.edu> <87lgc9tp1m.fsf@gmail.com> <83tvqxaxof.fsf@gnu.org> <87zi0prrxf.fsf@gmail.com> <83vabc9sfo.fsf@gnu.org> <83603ba6rb.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1527280666 29540 195.159.176.226 (25 May 2018 20:37:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 May 2018 20:37:46 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 25 22:37:42 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fMJT2-0007Zy-Bb for ged-emacs-devel@m.gmane.org; Fri, 25 May 2018 22:37:40 +0200 Original-Received: from localhost ([::1]:46626 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMJV9-0002Tx-JU for ged-emacs-devel@m.gmane.org; Fri, 25 May 2018 16:39:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44398) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMJUV-0002Tq-LF for emacs-devel@gnu.org; Fri, 25 May 2018 16:39:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMJUS-0002sQ-II for emacs-devel@gnu.org; Fri, 25 May 2018 16:39:11 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:38860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMJUS-0002rC-Bc; Fri, 25 May 2018 16:39:08 -0400 Original-Received: from lechazo.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w4PKd6IV020557; Fri, 25 May 2018 16:39:06 -0400 Original-Received: by lechazo.home (Postfix, from userid 20848) id B0690609D5; Fri, 25 May 2018 16:39:06 -0400 (EDT) In-Reply-To: <83603ba6rb.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 25 May 2018 22:13:12 +0300") X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 3 Rules triggered ATR_WMN=0.2, EDT_SA_DN_PASS=0, RV6294=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6294> : inlines <6660> : streams <1787789> : uri <2647162> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225725 Archived-At: >> >> > +(make-obsolete 'image-jpeg-p nil "27.1") >> >> Nowadays I'd recommend the use of (declare (obsolete nil "27.1")) >> > Why? What are the factors to consider? >> My recommendation? > I was hoping to hear some of the reasons why you recommend that, I know, but I must admit that it's largely a question of taste. I wrote the code that makes it possible, so I'm biased. Still, regarding my motivation for writing this code: - I like the fact that it avoids duplicating the function name. - It makes it possible for C-M-x to work correctly (e.g. remove the obsolescence if you remove the `obsolete` from the `declare` (or if you C-M-x on a completely different definition which happens to have the same name) tho admittedly the current implementation doesn't actually do it). - More generally, it attaches the declaration to the function's *definition* rather than to its *name*, which I think is TRT (even tho, again, the underlying implementation still ends up associating the two via the name). - I guess it's more declarative (tho this word tends to be used in programming languages a bit like "goodness" in cereal packages or the way "GT" was used in cars (back when I was interested in them)). -- Stefan