From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#40671: [DOC] modify literal objects Date: Thu, 30 Apr 2020 22:15:53 -0700 (PDT) Message-ID: <47664b27-687f-4d23-bc55-9f3faa7965a9@default> References: <530d3597-aaaa-f019-bafa-8229d13e7248@yandex.ru> <60b88f52-c50d-c57a-9ce5-495e6157d36e@cs.ucla.edu> <0721d8c1-4fe3-335c-7dbc-171487cb648a@yandex.ru> <6d1015da-0dc1-376c-f84b-5e3ee3149213@cs.ucla.edu> <286139d2-bbe1-2d5a-bec1-f781666376f1@yandex.ru> <10b89e6f-6fa6-f855-65b6-3361a74472d3@cs.ucla.edu> <8542efe2-c4a6-1da5-2513-7ffcaa6c4ec9@yandex.ru> <293d0eab-4617-08fe-aafa-d6841a750af0@cs.ucla.edu> <4085994e-f42d-b90f-9c86-ad42689bbff2@yandex.ru> <9cfc3b63-7df6-145a-8a78-e3320b6d3861@cs.ucla.edu> <72399223-0ab5-dbe4-5027-d929450a4df0@yandex.ru> <1a2d0454-baa4-9831-0e2c-4411eda1c2fe@yandex.ru> <278a1350-8b9e-4f3b-854a-723d578129f3@default> <6cbe3c10-6d81-f2be-30d7-17096b3f3517@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="82866"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Heerdegen , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , ke.vigouroux@laposte.net, 40671@debbugs.gnu.org, Richard Stallman To: Dmitry Gutov , Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 01 07:21:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1jUO6o-000LPG-E5 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 May 2020 07:21:10 +0200 Original-Received: from localhost ([::1]:53812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUO6n-0003bT-E6 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 May 2020 01:21:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34910) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUO6Z-0003Zk-55 for bug-gnu-emacs@gnu.org; Fri, 01 May 2020 01:21:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUO4m-0005jr-0x for bug-gnu-emacs@gnu.org; Fri, 01 May 2020 01:20:54 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36541) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUO4l-0005fG-Jk for bug-gnu-emacs@gnu.org; Fri, 01 May 2020 01:19:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jUO4k-00018L-Cd for bug-gnu-emacs@gnu.org; Fri, 01 May 2020 01:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 May 2020 05:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40671 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 40671-submit@debbugs.gnu.org id=B40671.15883103064308 (code B ref 40671); Fri, 01 May 2020 05:19:02 +0000 Original-Received: (at 40671) by debbugs.gnu.org; 1 May 2020 05:18:26 +0000 Original-Received: from localhost ([127.0.0.1]:48087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUO49-00017Q-R0 for submit@debbugs.gnu.org; Fri, 01 May 2020 01:18:26 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:49146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUO48-00017D-Bm for 40671@debbugs.gnu.org; Fri, 01 May 2020 01:18:24 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0415HwAT051078; Fri, 1 May 2020 05:18:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=ZBw9E0DTtndwbDqhYRxVq0LjcSFUJ22Ia0okaeM2vNE=; b=YAlLsytXov/ovsm0GgCsmLXH7MATRtD5rkdNgHYtBrH/JarjlZPX0fyPcXdDBwcA08+p fRH7BVwwh34L7MxNc3TC68hwJDRuCUAIyfbDfPaHfjsu9j6yNw9Jr9BIFy/DDFCVK1J0 tbWBye2H8cQK1DlLoap+oNnGJEIDJFZw3jImktpvjKInPLXFh2rCFGyr/R+2afuo4iy+ 7FVFwBoQlOCHbYBMzNgYOo54lxZZ/wzs6wrH1WLKITO24G0985+wvajH6ad4MuCS/gMw EHG4sw0vXh8QLzwoTs1xB3bp46KWqdBCAF4i0bevpRGQKnxm+JOwDSXmS0zvl/7+v92Q cg== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 30r7f80uf6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 May 2020 05:18:09 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0415CWov032909; Fri, 1 May 2020 05:16:08 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 30r7f2vbfb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 May 2020 05:16:08 +0000 Original-Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0415Fs4t015452; Fri, 1 May 2020 05:15:54 GMT In-Reply-To: <6cbe3c10-6d81-f2be-30d7-17096b3f3517@yandex.ru> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4993.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9607 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=18 phishscore=0 adultscore=0 spamscore=0 mlxlogscore=900 bulkscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005010036 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9607 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 mlxlogscore=959 spamscore=0 malwarescore=0 clxscore=1015 phishscore=0 mlxscore=0 lowpriorityscore=0 suspectscore=18 adultscore=0 priorityscore=1501 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005010036 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179415 Archived-At: > >> You're _not_ using the language that's used for Common Lisp. > > In what sense does the language differ? Here's a quote from CLtL2 > (page 115): > > > > "it is an error to destructively modify any object that appears as a > constant > > in executable code, whether within a 'quote' special form or as > > a self-evaluating form." >=20 > As Drew pointed out (and if I understood this correctly), the above > specification leads to implementations that do raise an error when > someone tried to modify such a value. That's my understanding. I believe that wasn't the case for CLTL(1) - there was no such promise or requirement. And I think it's also not the case for Elisp. Like CLTL(1), we should just warn users about the gotcha, since there's no protection from it. To be clear, I'm no expert on CLTL2. I used CL for years before that. The gotcha bit me once, having modified the result of a quoted list - and then someone explained what was happening. It's too easy for a newbie to think only in terms of textual source code being interpreted. It's easy not to realize, as Michael said, that there's the Lisp reader, the interpreter, and the byte-compiler, and each might get a chance to handle a quoted list. And just how they did so was not specified. Presumably, a conformant CL implementation now protects you from this gotcha.