From: Michael Heerdegen <michael_heerdegen@web.de>
To: "Štěpán Němec" <stepnem@gmail.com>
Cc: Paul Eggert <eggert@cs.ucla.edu>, emacs-devel@gnu.org
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 [thread overview]
Message-ID: <87pnc1kapz.fsf@web.de> (raw)
In-Reply-To: <87k12a4gm1.fsf@gmail.com> ("Štěpán Němec"'s message of "Mon, 20 Apr 2020 12:05:26 +0200")
Štěpán Němec <stepnem@gmail.com> 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.
next prev parent reply other threads:[~2020-04-20 23:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200418200112.26900.1274@vcs0.savannah.gnu.org>
[not found] ` <20200418200114.85C8C20A2B@vcs0.savannah.gnu.org>
2020-04-18 21:24 ` emacs-27 eebfb72 1/2: Document constant vs mutable objects better Štěpán Němec
2020-04-18 21:57 ` Drew Adams
2020-04-19 20:37 ` Paul Eggert
2020-04-19 22:33 ` Štěpán Němec
2020-04-19 23:48 ` Paul Eggert
2020-04-20 0:18 ` Michael Heerdegen
2020-04-20 10:05 ` emacs-27 eebfb72 1/2: Document constant vs mutable objects better, Re: emacs-27 eebfb72 1/2: Document constant vs mutable objects better, " Štěpán Němec
2020-04-20 23:18 ` Michael Heerdegen [this message]
2020-04-22 17:54 ` Paul Eggert
2020-05-02 12:50 ` Štěpán Němec
2020-05-02 21:08 ` Paul Eggert
2020-04-20 0:16 ` Michael Heerdegen
2020-04-21 1:48 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pnc1kapz.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=stepnem@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.