bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#55645: src/print.c; print_object changes make it impossible to compa


From: Lars Ingebrigtsen
Subject: bug#55645: src/print.c; print_object changes make it impossible to compare elisp code across versions
Date: Sat, 28 May 2022 12:39:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Tom Gillespie <tgbugs@gmail.com> writes:

> That being said, I think this is be the first time in the history
> of emacs that prin1 for symbols has changed, so having a
> way to preserve the old behavior for things that depend on it
> would be greatly appreciated.

That's makes sense, but:

>> prin1?  Stable for 30 years?  Nope.  (But some objects have had a stable
>> printed representation that long, I'm sure.)
>
> Er, indeed, I was being overly general, I meant symbols specifically.

If you're using prin1 as a way to compare stably differences between
objects, this only works by accident: You have to be very lucky in which
objects you have included in the output so far if you've managed to make
this code work over time.

We can indeed add something that lets you control how symbols in
specific are output by prin1, but I don't really see the utility in
general -- because we have changed, and will change, how other objects
are output by prin1, and if the objects you're outputting happens to
contain these, your algo will break again.

So I think this is one of those "don't do that" things, unfortunately.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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