From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Which Elisp types are mutable? Date: Mon, 05 Jul 2021 16:19:29 -0400 Message-ID: References: <87h7ifa932.fsf@mbork.pl> <0404DE66-DD17-41F2-B6CC-EC06937CD152@gmail.com> <874keca73x.fsf@mbork.pl> <70773EA8-6549-4C03-941C-FADAB1BE441A@gmail.com> <92E21250-DE31-4637-97A6-63E2C1C719A8@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26680"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Philipp Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 05 22:20:22 2021 Return-path: Envelope-to: geh-help-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 1m0V4n-0006iI-S0 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 22:20:22 +0200 Original-Received: from localhost ([::1]:48430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0V4m-0002qf-Q9 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 16:20:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0V49-0002qS-Nh for help-gnu-emacs@gnu.org; Mon, 05 Jul 2021 16:19:41 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32017) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0V46-0007wT-Ln for help-gnu-emacs@gnu.org; Mon, 05 Jul 2021 16:19:40 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A982E440FBD; Mon, 5 Jul 2021 16:19:35 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4C7AA440F98; Mon, 5 Jul 2021 16:19:30 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1625516370; bh=A6UdOChM0iwtQvO5DYTFVCP//n0BDK1De88O/G+vAzY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=etNRjDB+WUFXMP+HfRIeskmK/DXdYD4qZWwjV76hu5gcNqtOwtYepy+Ik1tV8iLSg nBNE53G+VVrcx5Nnl68vpPhfUAuS8LwGPn2dAtTvTlPns5b21pBZcLXiwqdGMhp4to sW+DTpUeQgCelb5ZXKMCG6QfHLI2XBdzIBLL9FF1Qq+ykb4qqx4xteACThwSzEW/12 Je/kHANIP5vuXa/FjLLWtIDtXNou3luWvUDL6T3Kizgeo9PLfbNoMsJT6nc57hLbYK X3UWWsmLN5cqxJhJoGSNXuq/f/yHYAvrQjU2vbP86MBnkgxBc//LfDvRiDRJmsTYzX hXd45ExiYNWxA== Original-Received: from alfajor (unknown [45.72.205.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1CD1E120189; Mon, 5 Jul 2021 16:19:30 -0400 (EDT) In-Reply-To: <92E21250-DE31-4637-97A6-63E2C1C719A8@gmail.com> (Philipp's message of "Mon, 5 Jul 2021 20:40:01 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:131499 Archived-At: Philipp [2021-07-05 20:40:01] wrote: >> Am 05.06.2021 um 16:25 schrieb Stefan Monnier via Users list for the GNU >> Emacs text editor : >>> "You must not mutate them" is the definition of immutable. >> Not necessarily: where I come from "immutable" means that the object >> cannot and will not be mutated. > Then there are no immutable objects, because all objects are stored in > mutable memory. You're confusing a language and its implementation. E.g. ELisp bytecode objects are immutable vectors. Technically there is some potential way to mutate them because they're stored in the normal mutable memory, but efforts were made so that ELisp code cannot mutate them. For the same reason, ELisp code cannot "transmute" a marker into an overlay, even though nothing stops you from doing it at the C level. > So this definition of "immutable" isn't very useful. I think most language designers would beg to differ. Stefan