GNU bug report logs - #65051
internal_equal manipulates symbols with position without checking symbols-with-pos-enabled.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Fri, 4 Aug 2023 14:01:02 UTC

Severity: normal

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 65051 <at> debbugs.gnu.org
Subject: Re: bug#65051: internal_equal manipulates symbols with position
 without checking symbols-with-pos-enabled.
Date: Mon, 07 Aug 2023 22:56:31 -0400
>> Could you explain why you think it's a bug?
> When symbols-with-pos-enabled is non-nil, the two arguments to that
> equal call are equal.  That is the point of s-w-p-e.

AFAIK the point of the `symbols-with-pos-enabled` is to try and keep the
performance impact of sympos under control, and that matters only for
`eq`, so I don't think there's a strong reason here for `equal` to pay
attention to it.

> When s-w-p-e is nil, and the "magic" is thus switched off, the two lisp
> objects have different type (the first is a symbol, the second is a
> pseudovector), thus cannot be equal.

"cannot" is obviously not the correct word here, since currently they
are considered `equal`, so clearly they *can* be considered `equal`:
it's easy to implement, and experience shows that "it works".

So I'm still wondering why you think it's a bug.

AFAICT whether sympos should be `equal` to others and/or to bare symbols
is something we pretty much get to choose freely based on convenience:
either the current behavior or the one you now advocate are perfectly
acceptable and not bugs.

As I said elsewhere, I'm not sure which choice is best, but at least we
have some experience with the current choice and I haven't seen any
clear problem with it yet, so I'd tend to lean towards keeping the
current behavior.

What would be the concrete advantages of the new behavior compared to
the current one?


        Stefan





This bug report was last modified 1 year and 314 days ago.

Previous Next


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