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

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

bug#43598: replace-in-string: finishing touches


From: Mattias Engdegård
Subject: bug#43598: replace-in-string: finishing touches
Date: Mon, 28 Sep 2020 11:40:02 +0200

28 sep. 2020 kl. 05.41 skrev Richard Stallman <rms@gnu.org>:

> It is paradoxical, but I think it is correct.
> Equal compares the type of the string, not just the
> characters in it.

No it doesn't. (equal (string-to-multibyte "A") "A") => t.

There is no deep reason for the current behaviour. It's just how things came to 
be, and nobody has been sufficiently annoyed to change it. The implementation 
is efficient and good enough for most purposes.

It is inconsistent and confusing though, and occasionally it does break down. 
One such case is when two strings that are not 'equal' become 'equal' after 
printing and reading them back, since unibyte and multibyte strings have the 
same printed representation. This can arise in conjunction with byte 
compilation.

Again, I have no plans to do anything about it right now.






reply via email to

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