From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: master f51f963: Fix some side-effecting uses of make-text-button Date: Sun, 07 Jun 2020 09:14:06 +0000 Message-ID: <87h7vnxmox.fsf@gmail.com> References: <20200604223056.17078.81265@vcs0.savannah.gnu.org> <20200604223058.1850020A26@vcs0.savannah.gnu.org> <87eeqtiy4x.fsf@tcd.ie> <87img51y04.fsf@gmail.com> <5c66eeb5-a513-0443-4316-e41aae118677@cs.ucla.edu> <87img4zjy7.fsf@gmail.com> <170bedfa-7119-4d6a-9d4f-e94ba0f7cc2b@default> <87pnacxbnk.fsf@gmail.com> <31332591-f540-de69-26a8-03c0d8dd2c9d@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="13795"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: "Basil L. Contovounesios" , Stefan Monnier , Drew Adams , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 07 11:15:29 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 1jhrOr-0003Uo-0d for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Jun 2020 11:15:29 +0200 Original-Received: from localhost ([::1]:49832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhrOq-0001zD-3b for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Jun 2020 05:15:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhrNm-0001XK-Pv for emacs-devel@gnu.org; Sun, 07 Jun 2020 05:14:22 -0400 Original-Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]:41316) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhrNm-0002Rh-2W for emacs-devel@gnu.org; Sun, 07 Jun 2020 05:14:22 -0400 Original-Received: by mail-ed1-x543.google.com with SMTP id m32so5714789ede.8 for ; Sun, 07 Jun 2020 02:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=kz29cip8dEZjCNSggifLZ8CNCg44tqMfOE8Mj5yCzss=; b=EjnUSWpWpI5j24rO9eCYZgN8citdOP51v8lJnbZ/UbkUs+Y0Zot2Pu2XCbgftPBK0e 7lhvbq0Qfq2FfmbVEyhmReXJFNPVUtljeA5lsIZ8+olGSxCFF8j0ysaG3d7FKaqP4C1/ 0lM1smJb8gAhkqoHSm2Vy4Qi3jUevlD1v/hR0Gs//eHSXVfvYGRAWWYmrl3fDCxXAc3a okITYvGxfAqtsSG8smdh0IUdAuFsccrOGVS+SlHxNzVilctBqdDKPBuMJ/Y+xSxkl4Nf Mxa9qMrYARcwCsbhs4bGHqZbUSooLsk7CTleiCLq3eTE8ZJHJJSDqJQ18RdEi30/Oa5+ 1I/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=kz29cip8dEZjCNSggifLZ8CNCg44tqMfOE8Mj5yCzss=; b=hVh+dEVTgr0HQCM3H/wKQmwieS6NxSMCOa6aM+M4EByoEyw5EkrUvboNhz1hAgagjH ppQS7B//12tsqK5m7EooMSU/EWx33BOT+x2jduLj+TPkqZ7Uji+AVhCS80DIGRVh5NSX 5Ssroju91WVqlCpOwvFBpgMM6U6CYKafUO+ffgzGoAoWbYo9Wew39pKoYwSWwJOL1MLb Lg0VramguhWOdP+m9XA8l7A5dBwnO0Y3K8ddk491P5eoAlf+R4radAC3FAT3gAt8wusM v0bbxUWM+l7gM8qxgEgsO/NmttGuKikdrp232xZX+faqfT0Dz8iRfZxwe/bFjDBWnOQv J4aQ== X-Gm-Message-State: AOAM532NoszW6c+2efokCTG3jhBxIb772VJeZcjaUeEaPgOCQVsy6tsf OVI5vDOGxUd93quJ4fC4o0pvl+u/6PU= X-Google-Smtp-Source: ABdhPJwvy6Ij6q1aS/N1tGfx0uFv8pk869YsAk3GSBUrKuZKykndHFTb3AaAOvPsDWUNgEQNI82sMA== X-Received: by 2002:a50:a8a2:: with SMTP id k31mr16598131edc.357.1591521259725; Sun, 07 Jun 2020 02:14:19 -0700 (PDT) Original-Received: from chametz (lumumba.torservers.net. [77.247.181.163]) by smtp.gmail.com with ESMTPSA id v7sm9104168edq.82.2020.06.07.02.14.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jun 2020 02:14:19 -0700 (PDT) In-Reply-To: <31332591-f540-de69-26a8-03c0d8dd2c9d@cs.ucla.edu> (Paul Eggert's message of "Sat, 6 Jun 2020 12:49:50 -0700") Received-SPF: pass client-ip=2a00:1450:4864:20::543; envelope-from=pipcet@gmail.com; helo=mail-ed1-x543.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: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 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, RCVD_IN_BL_SPAMCOP_NET=1.347, 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:251995 Archived-At: Paul Eggert writes: >> consider quasi-quoted literals: would those be immutable? > > A string literal should not be modified, regardless of whether it's > quasiquoted. > > A subexpression of `X that contains no substitutions or splices yields conses > that should not be modified. > > These two rules are reasonably simple and are already documented, and neither > rule should be that hard to remember for the few people whose code is affected > by this issue. Okay. It's a situation I was unsure about myself, but if these are the rules, they are easy enough to remember. >> It would lead to some people developing a false sense of security > > "False sense" because programmers would start relying on Emacs to > catch trivial > mistakes involving modifying string literals? Horrors! (Programmers should let > those mistakes persist into hard-to-debug complex programs, as this will give > them much more of a challenge when debugging. :-) I'm not sure programmers would realize those errors are caught only at run time, rather than being detected at compile time, which they could be in many cases.