From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: =?UTF-8?Q?Re=3A_31395511=3A_=22Don=E2=80=99t_attempt_to_modify_constant_st?= =?UTF-8?Q?rings=22?= Date: Sat, 6 Jun 2020 12:41:18 +0100 Message-ID: References: <871rmvn7ge.fsf@gmail.com> <87lfl36abx.fsf@gmail.com> <1abe5965-b48e-6dee-1516-c5c233f09d01@cs.ucla.edu> <873679lel3.fsf@gmail.com> <87d06dje3d.fsf@gmail.com> <58642244-da07-c96d-21d5-d7d46714678d@cs.ucla.edu> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d7ad0805a768db80" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="73752"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel , Pip Cet , Dmitry Gutov To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 06 13:42:11 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jhXDG-000J59-UL for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Jun 2020 13:42:10 +0200 Original-Received: from localhost ([::1]:57588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhXDF-0003yu-Tg for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Jun 2020 07:42:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhXCe-0003Yt-Nm for emacs-devel@gnu.org; Sat, 06 Jun 2020 07:41:32 -0400 Original-Received: from mail-il1-x12b.google.com ([2607:f8b0:4864:20::12b]:46878) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhXCd-0000iD-E9 for emacs-devel@gnu.org; Sat, 06 Jun 2020 07:41:32 -0400 Original-Received: by mail-il1-x12b.google.com with SMTP id h3so12175949ilh.13 for ; Sat, 06 Jun 2020 04:41:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WfG+ZiVq8PvQpnVdyPQArsK3pjgrMVqPRCZbb9lsyTw=; b=TSeY6ViPOpVacRwIhSFBUqSO23sdkUrxLTDjUXQuLJbou0rYjbU5M8SmEpjzr9D2BA xPmykEV/37j6agnTaKqHPoMtJAJoyWsIX0iwfMaRj/fHqzHXaBDELOITU8fZjFN1k6a2 Po6GWhQ4wk5/JD9lIGAYOzBWpX2bJorHUx4YmX8Y8n04EmrreCEkJ7ADefTIBhMuberT 2Ofetmg0wTD1tC4OPL2yZ51gwnsisfI3Y/p7nCK5Up6CWx/E9PsZ2ACXdBGZy5nVYmGv W4iS4Nvx9+1HltkCIJ53i1i+JZ5KXH4p+VYipautpusv9EG2U195Nj6BiOsVIkEU8Fhn tIIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WfG+ZiVq8PvQpnVdyPQArsK3pjgrMVqPRCZbb9lsyTw=; b=OhUdPYRSMoMZUSN+8zzEkENcu9NnncWNyU1XxCaExS2npADSgomvEdDDuXimnt1AGU 58mE0wecHOn8kvcrOCqjENevOR2v0cOkfw+T72geDVf2Vh2aYiNcgy8uqguq/DZwkvcG I+i/y5Ro0Fxj24k8EZt0yGnXFK4yZV2Ynz9KhXZc6EgEmnRjSWkX6UzF1C5vhdxMEqe9 S6XACDxBj5D2fo3Ov0GWOryEZbVgpX4Z02OcDe7q4gKAnE/LrMttXTIJIUqszp4a8XvQ F8TExAv4DWCw4r2/va7DI/rm6rjD5EPFmJYaQbcOQdDFmTt2iWuRdGMqDVB4zBJAylWm 2QwQ== X-Gm-Message-State: AOAM532QLCuVliiBnPws/ApDfEWGTVtgNFCjKy7QWqkncNw2tHggX33h E+NlX+W38gFJ4BX8r3N0Xi4RqWOTUN1A7QJz220= X-Google-Smtp-Source: ABdhPJygr6Nb8kH7aEUX/SAB6tLb4/otB7JbotecojXLQtVX2NXO367va8Ma3ycZlL77NyvZX1i6hnlomTj26w4FPb4= X-Received: by 2002:a92:c60b:: with SMTP id p11mr6023612ilm.137.1591443690333; Sat, 06 Jun 2020 04:41:30 -0700 (PDT) In-Reply-To: <58642244-da07-c96d-21d5-d7d46714678d@cs.ucla.edu> Received-SPF: pass client-ip=2607:f8b0:4864:20::12b; envelope-from=joaotavora@gmail.com; helo=mail-il1-x12b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FROM_EXCESS_BASE64=0.979, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251947 Archived-At: --000000000000d7ad0805a768db80 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jun 6, 2020 at 2:43 AM Paul Eggert wrote: > On 6/5/20 4:19 PM, Jo=C3=A3o T=C3=A1vora wrote: > > I totally agree it is > > undefined behaviour to change structure of literals (quoted or > > self-evaluating objects), also in Common Lisp, because compilers are > > probably allowed to reuse parts of the internal structure of such > > objects. But that's a far cry from having two different manifestations > > of `equal` such objects _be_ the same object, but only for compiled > > code. > > I don't understand this remark, as the idea that "compilers are allowed t= o > reuse > parts" necessarily implies that (eq "a" "a") can be t if the compiler > decides to > reuse the string. Depending on the implementation of sequences, it could reuse only the later parts of the sequences to maintain uniqueness and still have > Certainly in Common Lisp (eq "Foo" "Foo") might be true or > false (this specific example is called out in CLtL 6.3). > I stand corrected. I was simply mistaken :-) Jo=C3=A3o --000000000000d7ad0805a768db80 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Jun 6, 2020 at 2:43 AM Paul Egger= t <eggert@cs.ucla.edu> wrot= e:
On 6/5/20 4:19 PM, Jo=C3=A3o T=C3=A1vora wrote:
> I totally agree it is
> undefined behaviour to change structure of literals (quoted or
> self-evaluating objects), also in Common Lisp, because compilers are > probably allowed to reuse parts of the internal structure of such
> objects.=C2=A0 But that's a far cry from having two different mani= festations
> of `equal` such objects _be_ the same object, but only for compiled > code.

I don't understand this remark, as the idea that "compilers are al= lowed to reuse
parts" necessarily implies that (eq "a" "a") can b= e t if the compiler decides to
reuse the string.

Depending on the impleme= ntation of sequences, it could reuse only the
later parts of the = sequences to maintain uniqueness and still have
=C2=A0
=
Certainly in Common Lisp = (eq "Foo" "Foo") might be true or
false (this specific example is called out in CLtL 6.3).

I stand corrected.=C2=A0 I was simply mistaken :-)

Jo=C3=A3o
--000000000000d7ad0805a768db80--