|
From: | Michael Heerdegen |
Subject: | Re: emacs-27 eebfb72 1/2: Document constant vs mutable objects better, Re: emacs-27 eebfb72 1/2: Document constant vs mutable objects better, Re: emacs-27 eebfb72 1/2: Document constant vs mutable objects better |
Date: | Tue, 21 Apr 2020 01:18:16 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Štěpán Němec <address@hidden> writes: > > (eq "" "") => t. You don't even have to compile. > > Yes, but that's a corner case [...] Sure. OTOH it is a good demonstration of the fact that not every "created" string is a new object. That only one "" exists is one optimization. That the compiler sometimes maps (other) equal strings to the same object is another one. Anyway, I didn't intend to demonstrate something special. But that "" is unique was not as obvious as the uniqueness of nil for me. > > It is important. This once bit me, and it took a long time until I > > found out what was wrong. > Here I assume you mean something else than the empty string case? Yes, it was something different, I don't recall exactly, I guess I was using strings as keys in some association structure or so. Michael.
[Prev in Thread] | Current Thread | [Next in Thread] |