From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Newsgroups: gmane.emacs.help Subject: Re: Which Elisp types are mutable? Date: Sat, 5 Jun 2021 14:58:02 +0200 Message-ID: <70773EA8-6549-4C03-941C-FADAB1BE441A@gmail.com> References: <87h7ifa932.fsf@mbork.pl> <0404DE66-DD17-41F2-B6CC-EC06937CD152@gmail.com> <874keca73x.fsf@mbork.pl> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3264"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs mailing list To: Marcin Borkowski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 05 14:58:34 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 1lpVso-0000fB-1g for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 05 Jun 2021 14:58:34 +0200 Original-Received: from localhost ([::1]:45408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpVsn-0002ng-39 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 05 Jun 2021 08:58:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpVsQ-0002nW-0l for help-gnu-emacs@gnu.org; Sat, 05 Jun 2021 08:58:10 -0400 Original-Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:34789) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpVsL-0005Ox-Px for help-gnu-emacs@gnu.org; Sat, 05 Jun 2021 08:58:09 -0400 Original-Received: by mail-wm1-x32b.google.com with SMTP id u5-20020a7bc0450000b02901480e40338bso5341523wmc.1 for ; Sat, 05 Jun 2021 05:58:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=iIymq7UAuvqVWm9H7sb76hSpCrhFEGoueEc3Fgk0pis=; b=TPnRGvLWva+Tg+ryvkb5dJC19pdlsmUE7Z1vBAxLaJ1QMxt05MaH94fXPtLevl6If7 7KH+zqAChZjsxc702BlHp34ioT7/A1go024vRTSYpfl8h5Bk/SvJUtSiZW+oGt7gKRyk JRwpqYPrBecxIPFLWwMykh96bWfIgyG3YZ0VWob5IlBBT4TgDAYFWe8ivmwok8hkFB/F yH6MwsE21yn/Nb2GuJVUiw/bFAgQESHBOJ1kX9RIMlxjCr8bOIN58azYYBF2s2Q0aLlr KbcSELWDjl/qDcX3HnBHqLc81kCprn2rTg82s44lIbCLN8IWyJueVbZLqHZDV/oAC7Ir DXrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=iIymq7UAuvqVWm9H7sb76hSpCrhFEGoueEc3Fgk0pis=; b=Npb9qvPkore9siKonEHfv6Pm+cm9oqjstTu0l+QV+Yn85Ba5DF8BXXXIVgOmVV24+G OIKpbgqe1rej2r0d9jFOGkCgfi1EoMoAPjF54y68UF3uS5cnDejZqbsKgZPpTfJ+jJYM x/gXQmhHbJRaNBmI/bXU3K6HamgChsquH1FUHNpyvUo/Wtkn1Fhj1l23HYmvItTMF+M+ +M2NfuaQ4wpIstwDcCzdojFyITWkLOLc//nFzkjDx9cORU5FoNRoEXapDoYxrMg8rrbr Dwrip4NzrY/wqepaXZjJFkR2o/svtFwE5OtbWIMZQfag813Qrdgz/Cg68XRS33XZ01S1 QBHw== X-Gm-Message-State: AOAM530nb/r05Ls46b2aqKIPuvMb9N6Wr4U9mlKhctyAFTTStHKFVUVE VUrR3a7O93K0sCN6gXYPVyLIYygEPZ9m1Q== X-Google-Smtp-Source: ABdhPJwLz+T09p3PANwL//sOEzE9s1hTDGXkyw+KY5H5oTIqxez3O3NKWh38a4jgTJUmjwdEIzHI3Q== X-Received: by 2002:a1c:3c89:: with SMTP id j131mr8263298wma.85.1622897883955; Sat, 05 Jun 2021 05:58:03 -0700 (PDT) Original-Received: from smtpclient.apple ([46.128.198.100]) by smtp.gmail.com with ESMTPSA id v18sm10716012wrb.10.2021.06.05.05.58.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jun 2021 05:58:03 -0700 (PDT) In-Reply-To: <874keca73x.fsf@mbork.pl> X-Mailer: Apple Mail (2.3654.80.0.2.43) Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=p.stephani2@gmail.com; helo=mail-wm1-x32b.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:130546 Archived-At: > Am 05.06.2021 um 13:22 schrieb Marcin Borkowski : >=20 >=20 > On 2021-06-03, at 14:11, Philipp wrote: >=20 >>> Am 03.06.2021 um 06:03 schrieb Marcin Borkowski : >>>=20 >>> Well, the subject says it all. I could find an explicit, = comprehensive >>> list of mutable (or immutable) types in the Elisp manual. Is it = there >>> somewhere? >>=20 >> Mutability is a property of objects, not types. >> Some objects (numbers) are always immutable, others (markers, = buffers, ...) are always mutable. But objects of most "interesting" = types (strings, lists, vectors, symbols) can be either mutable or = immutable. >> Some time ago, I filed = https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D43557 to document which = objects are mutable, but unfortunately it's not yet fixed. >=20 > Thanks. However, I still don't understand. How can a list be > immutable? What about a string? I thought these are _always_ mutable > (although in some cases you must not mutate them, because if you do, = bad > things could happen "You must not mutate them" is the definition of immutable. > Also, I thought symbols are immutable. Can you provide an example > showing that they aren't? Symbols are probably a weird case terminology-wise. Here I define = "mutable symbol" as symbol whose value and function slots can be changed = (true for most symbols except keywords). However, arguably other = definitions are possible, depending on whether you see their values and = function slots as "part of a symbol" or as something they refer to. = (The manual doesn't specify this.)=