bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36407: 27.0.50; `plist-get', `equal' etc. and circular "lists"


From: Paul Eggert
Subject: bug#36407: 27.0.50; `plist-get', `equal' etc. and circular "lists"
Date: Thu, 27 Jun 2019 15:51:37 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2

I don't understand why the last two lines are there.

I thought those lines were needed to avoid an infinite loop in pathological cyclic cases. But on further thought you're right, they aren't needed. I installed that patch; thanks.

shouldn't `equal' be symmetric?

Yes, on its domain. But circular lists are outside its domain, and the documentation doesn't promise any particular behavior on them. It's OK if (equal a b) signals an error and (equal b a) does not. It's even OK if (equal a b) signals an error and a later call (equal a b) with exactly the same (unchanged) arguments does not (because the stack happens to have more room the second time). We still have symmetry in the sense that (eq (equal a b) (equal b a)) always either returns t or signals an error; it never returns nil.

I installed the attached doc patch to try to make this a bit clearer.

Attachment: 0001-Improve-equal-and-array-doc.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]