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: Sun, 28 Mar 2021 21:27:09 +0200 Message-ID: <87v99bnkoi.fsf@gnus.org> References: <87v99b5smv.fsf@gnus.org> <0EBFBE59-A4C2-4C61-AD1B-A66E8B5F99CF@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="24623"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Nicolas Petton , 47425@debbugs.gnu.org, Stefan Monnier To: Philipp Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 28 21:28:16 2021 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 1lQb56-0006IC-Kx for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Mar 2021 21:28:16 +0200 Original-Received: from localhost ([::1]:58094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQb55-0005HQ-Jt for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Mar 2021 15:28:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQb4s-0005FZ-Ct for bug-gnu-emacs@gnu.org; Sun, 28 Mar 2021 15:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35526) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQb4s-0003BN-5R for bug-gnu-emacs@gnu.org; Sun, 28 Mar 2021 15:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQb4s-0007PE-0T for bug-gnu-emacs@gnu.org; Sun, 28 Mar 2021 15:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Mar 2021 19:28: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.161695964328425 (code B ref 47425); Sun, 28 Mar 2021 19:28:01 +0000 Original-Received: (at 47425) by debbugs.gnu.org; 28 Mar 2021 19:27:23 +0000 Original-Received: from localhost ([127.0.0.1]:47072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQb4F-0007OO-9d for submit@debbugs.gnu.org; Sun, 28 Mar 2021 15:27:23 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:58774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQb4C-0007OC-VC for 47425@debbugs.gnu.org; Sun, 28 Mar 2021 15:27: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=vGe2DLSdix8ptHM9QRHA3CwDbvJEUF2PSrtEwBaJdpg=; b=IVDHNdWkiFkZM92qcjzLRYYpol L9zxN5/Zu7SzYY9ABXCGMdrg1IS60xM2DgQl04dN+r4w8RMTXRaxCMogpbfZ+z3tYxxXbeuP3rbxQ uRMjECaf3utq1DF+mE/TR+cGuf6skcwcAaaCNaTTKqMl+jLMlSgKnOiwfKhGuMfiJsn8=; Original-Received: from cm-84.212.220.105.getinternet.no ([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 1lQb42-0005uF-Il; Sun, 28 Mar 2021 21:27:12 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEWZiHhIIiGqm4uh Uzram1H///8bkq2dAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UDHBMTKeoPdrEAAAF3SURBVDjLdZKN tYMwCIUx6QChdIA86gBGnECz/0wPUFujlv6cI59www0Ax8CAnIGhSwFaAMKZFKXc5COOb84IIUPX gO4ZYhlL5IGxBQiMTwRMZ5A6QESFsQWqLoJYUKi0+TLVRYnFMT0A1VqlaDoc59C+dQMjc9MpOdBe 1GrkqbJqyEUjTzP3NyAKzfzWs14qpLz6QvpRk9UwbaF/We3sl0ml9zlYI7PHWyZV8Dm8VeC8kogv m5v8C3GQCBKjmLp3IsHxrxHvdQgzy5uBfMFcF3WxbuBQMy/F7XV1KOlrOqHsBWTXuV+SPe9eDfps qxL0rB7TNuBgG5C211Gb0Db4J2dt9lvVcOVuf6cWG9mWYa3wmqRWPj5GuQbYRvodx/2sftxDPOys dLM+4AX2SycQLelr1e4hx0hrnxboAfImLRdwp7yCcgfgB/DVku/cJ1Do41QL3BQ654MtnNz0WkG5 9no4sGit8qW6EDX9HtQ1bEt1u+qhoI1/E69UVoO/kYcAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEt MDMtMjhUMTk6MTk6NDErMDA6MDAa8ZHJAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTAzLTI4VDE5 OjE5OjQxKzAwOjAwa6wpdQAAAABJRU5ErkJggg== X-Now-Playing: Miranda Dali's _Miranda Dali_: "Bird" In-Reply-To: <0EBFBE59-A4C2-4C61-AD1B-A66E8B5F99CF@gmail.com> (Philipp's message of "Sun, 28 Mar 2021 21:20:53 +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:203207 Archived-At: Philipp 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?) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no