From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function Date: Mon, 27 Jun 2022 12:22:59 +0200 Message-ID: <87zghy5rss.fsf@gnus.org> References: <87v99b5smv.fsf@gnus.org> <0EBFBE59-A4C2-4C61-AD1B-A66E8B5F99CF@gmail.com> <87v99bnkoi.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39015"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Nicolas Petton , 47425@debbugs.gnu.org, Drew Adams , Stefan Monnier To: Philipp Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 27 12:52:40 2022 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 1o5mMC-0009wf-DD for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 12:52:40 +0200 Original-Received: from localhost ([::1]:54944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5mMB-0001G9-D6 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 06:52:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5luU-00059j-8B for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 06:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56023) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o5luT-000561-VI for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 06:24:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o5luT-0000lt-Ro for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 06:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Jun 2022 10:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47425 X-GNU-PR-Package: emacs Original-Received: via spool by 47425-submit@debbugs.gnu.org id=B47425.16563254042886 (code B ref 47425); Mon, 27 Jun 2022 10:24:01 +0000 Original-Received: (at 47425) by debbugs.gnu.org; 27 Jun 2022 10:23:24 +0000 Original-Received: from localhost ([127.0.0.1]:49914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5lts-0000kU-DX for submit@debbugs.gnu.org; Mon, 27 Jun 2022 06:23:24 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:35872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5lto-0000jt-7J for 47425@debbugs.gnu.org; Mon, 27 Jun 2022 06:23:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=0Uc9CS8mtTwh6te3cSUU8Lj2nbbZegSbJ/LwiNlrRDQ=; b=Qz0e5kpE7SfnrcwrHPb7Yj7exS OQDQOOYySKdcvyUy4VvyqUFMWX1JvrAh4xxD8bXRh0tzPrEmOibkxgjVoTiZXhKAkAUF8bMBm+/yL HKqSwCZuI/VXnVsMlfllRzznTXYrjDfmhmw1obXumLvwu3+G3XRNU9tBee6G50/0xo4I=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o5ltZ-0004nP-6m; Mon, 27 Jun 2022 12:23:07 +0200 In-Reply-To: <87v99bnkoi.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 28 Mar 2021 21:27:09 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:235428 Archived-At: Lars Ingebrigtsen writes: >> I'm not a fan of this since it would mean that these functions will no >> longer be side-effect-free. Adding a function argument to a function >> means that the function can no longer really promise anything, so it >> leads to code that's harder to reason about. > > `plist-put' already mutates state (of the plist), so it's not > side-effect-free... > > The other ones are, though. But... I'm not sure that's really much of > a concern in practice. (And Emacs should be able to reason about the > function, still, if the predicate passed in is side effect free, but I > guess we don't have the machinery for that in place?) We don't. Anyway, that was the only objection here, so I went ahead and made this change in Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no