From: Phil Sainty <psainty@orcon.net.nz>
To: Noam Postavsky <npostavs@gmail.com>
Cc: Gemini Lasswell <gazally@runbox.com>,
bug-gnu-emacs
<bug-gnu-emacs-bounces+psainty=orcon.net.nz@gnu.org>,
31688@debbugs.gnu.org
Subject: bug#31688: 26.1.50; Byte compiler confuses two string variables
Date: Sun, 03 Jun 2018 11:38:44 +1200 [thread overview]
Message-ID: <5c6b2383ccd9c7d9b4058d249274b8c4@webmail.orcon.net.nz> (raw)
In-Reply-To: <87po199id0.fsf@gmail.com>
On 2018-06-03 06:02, Noam Postavsky wrote:
> I don't think this is a bug, the compiler coalesces equal string
> literals.
Ouch. Has this always been the case? I've been firmly under the
impression that the lisp reader creates a new lisp objects whenever
it reads a string, so it's hugely surprising to me to learn that
(eq str1 str2) can return different results depending on whether
or not the code was byte-compiled.
I see that this is t when compiled and nil otherwise:
(let ((str1 "abc")
(str2 "abc"))
(eq str1 str2)))
But this is nil regardless:
(eq "abc" "abc")
This seems kinda horrible?
-Phil
next prev parent reply other threads:[~2018-06-02 23:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-02 17:51 bug#31688: 26.1.50; Byte compiler confuses two string variables Gemini Lasswell
2018-06-02 18:02 ` Noam Postavsky
2018-06-02 22:52 ` Gemini Lasswell
2018-06-02 23:25 ` Noam Postavsky
2018-06-03 0:40 ` Drew Adams
2018-06-02 23:03 ` Drew Adams
2018-06-02 23:38 ` Phil Sainty [this message]
2018-06-02 23:54 ` Noam Postavsky
2018-06-03 12:32 ` Phil Sainty
2018-06-03 13:05 ` Andreas Schwab
2018-06-04 10:02 ` Phil Sainty
2018-06-04 15:58 ` Eli Zaretskii
2018-06-04 17:01 ` Andreas Schwab
2018-06-08 15:09 ` Eli Zaretskii
2018-06-03 0:02 ` Michael Heerdegen
2018-06-03 0:46 ` Drew Adams
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5c6b2383ccd9c7d9b4058d249274b8c4@webmail.orcon.net.nz \
--to=psainty@orcon.net.nz \
--cc=31688@debbugs.gnu.org \
--cc=bug-gnu-emacs-bounces+psainty=orcon.net.nz@gnu.org \
--cc=gazally@runbox.com \
--cc=npostavs@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).