emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string-to-unibyte in image-jpeg-p


From: Stefan Monnier
Subject: Re: string-to-unibyte in image-jpeg-p
Date: Fri, 25 May 2018 16:39:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> >> > +(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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]