GNU bug report logs - #76017
31.0.50; Which args can cl-nintersection and cl-nset-difference mutate?

Previous Next

Package: emacs;

Reported by: "Basil L. Contovounesios" <basil <at> contovou.net>

Date: Sun, 2 Feb 2025 17:49:02 UTC

Severity: minor

Found in version 31.0.50

Fixed in version 31.1

Done: "Basil L. Contovounesios" <basil <at> contovou.net>

Bug is archived. No further changes may be made.

Full log


Message #33 received at 76017 <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> protonmail.com>
To: "Basil L. Contovounesios" <basil <at> contovou.net>
Cc: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 76017 <at> debbugs.gnu.org
Subject: Re: bug#76017: 31.0.50;
 Which args can cl-nintersection and cl-nset-difference mutate?
Date: Fri, 14 Feb 2025 15:21:09 +0000
"Basil L. Contovounesios" <basil <at> contovou.net> writes:

> Pip Cet [2025-02-14 11:13 +0000] wrote:
>
>> Maybe if feature/igc is merged, and becomes a common option, we can
>> formally make cl-nintersection an alias of cl-intersection,
>
> I haven't followed most of the feature/igc developments; how do they
> affect the choice of whether cl-nintersection aliases cl-intersection?

My hope is that an efficient GC greatly reduces the need for destructive
operations, but I'm not sure whether that's more of a dream :-)

>> As a followup, I would like to propose removing claims of cons cells
>> being reused "whenever possible", though: we reserve the right to
>> mutate one of the arguments, but we don't, so we shouldn't make such
>> claims.  (And what's "whenever possible" supposed to mean, anyway?  All
>> cons cells are equal!)
>
> The right to mutate one of the arguments is the function's raison
> d'ĂȘtre, and its users ought to be made aware of that before they choose
> to use it.  Today the implementation suffers from a clear performance
> bug, but tomorrow that might be fixed, and at such time its already
> informed users will automatically benefit from the fix.

That sounds like a good way to fix it, "simply" adjust the function to
do what the docstring already claims it does!

Good luck!

Pip





This bug report was last modified 95 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.