From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.help Subject: Re: Plist-put changes literal argument Date: Sat, 5 Sep 2020 17:55:20 +0200 Message-ID: References: <30E631BA-6845-43C1-AB5E-4C02C4F44780@gmail.com> <55491E0C-FFDF-43F8-853E-1CC826485D40@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34494"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Yuan Fu Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 05 17:56:04 2020 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 1kEaXr-0008pf-G3 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 05 Sep 2020 17:56:03 +0200 Original-Received: from localhost ([::1]:46150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEaXq-0007uK-HC for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 05 Sep 2020 11:56:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEaXO-0007u4-Er for help-gnu-emacs@gnu.org; Sat, 05 Sep 2020 11:55:34 -0400 Original-Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]:39139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kEaXM-0007Mo-Tl for help-gnu-emacs@gnu.org; Sat, 05 Sep 2020 11:55:34 -0400 Original-Received: by mail-oi1-x229.google.com with SMTP id 11so1209382oiq.6 for ; Sat, 05 Sep 2020 08:55:32 -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:content-transfer-encoding; bh=ZCUUeu35hmEr8q1q4qlf5mRPAFRTJH2r4z2Dbm5qJ84=; b=H6i+SkIBRCfRUPWOPe0Rax3qs2nzOlYb5gv2glt9gFtmTdjsH8gTI5Lbm2br5smFOI PaifdDXQD07XhNMmHxeRtzsJSif0VMO04j2vuDDXtmUpDm1473ZPiJZPdmnPgwU97ICS KjcuHihTvCT8SkWfDey55yL0RN5ImdW9DqQgfE+5MMgu4zj2iZgJKFAx1WZducLmCP1R R154kb0HE+PyrIeDpTtSm958X3DRsYXOQ2s6yLg/SMfEfrvFNBAEFuo/xFKiLlhB7AR8 HAzYUNLmVo65XUD9l+EtrXgfkbWvEP7HQAN/W1LkrSqKnWhSSk6+/yexDg8KkUO9r8Cg yyJg== 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:content-transfer-encoding; bh=ZCUUeu35hmEr8q1q4qlf5mRPAFRTJH2r4z2Dbm5qJ84=; b=kdr9i/CIA28zPGhIpkd7tUN46URMTlcdGXnuctKqSrYVGHU6okJ5VGsD9j14vw8Yg7 c+cehmiTTkdcpfQgRWjJ3Jfxdwk8qineUcuXtwTKF1Y+sHcVw3BmkgV2eVu8p5LuYCcn vzZL2hHMEFlH9qAS/S2rbbrsKzleDq8U2SRiQCN6+PIgF9/0FRbxGAqvLRtMFrPC4LYe i+es3sj154RCmmaX3KVmoNm5tH8SBzBYJWRXOS8/4nrYlyCyPXopp6qnRrWi9y5OV4c3 9LgxAgAlPo9JD0QlUBZYiX3FGDEJfYFHyjDN8IwLmPlwpodZmE8j8EM3Z7L4rd7vD4Gj /jCw== X-Gm-Message-State: AOAM532wX2OCWLz7k7vrkgx0yMphISwBxF4G7AE24+7CSbF+DW9GBj7+ 5wcOLD93rCHzu4AEUnka2qvfQ1HnjMf6k37FoE4= X-Google-Smtp-Source: ABdhPJzRh8w4AtpB/K5CE+x67fcjsS7pIgSQ34PmtH6/hZzKYHwSDiaYbyQMLcEW2OxJVLDB4aUhvl5v9pAvNinT45g= X-Received: by 2002:aca:c313:: with SMTP id t19mr8488675oif.65.1599321331624; Sat, 05 Sep 2020 08:55:31 -0700 (PDT) In-Reply-To: <55491E0C-FFDF-43F8-853E-1CC826485D40@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::229; envelope-from=p.stephani2@gmail.com; helo=mail-oi1-x229.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: -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:123977 Archived-At: Am Do., 3. Sept. 2020 um 02:18 Uhr schrieb Yuan Fu : > > > > > I also tried setcar, same result. So Elisp doesn=E2=80=99t copy argumen= ts? > > > > Yuan > > > Ok, think more of it, it would be weird to make a full copy of cons (and = other non-primitive values) on function call. I wonder how do other languag= es deal with this, because I never run into problems like this (except for = in Python, with its default argument values). Most other languages don't have literals of mutable types; or, if they do, they create a new object for each evaluation of the literal expression.