Subject: bug#65051: internal_equal manipulates symbols with position without checking symbols-with-pos-enabled.

From: Stefan Monnier <[email-masked]>
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