On 29/08/2011 12:39 AM, Patrick Walton wrote:
On 08/28/2011 07:10 PM, Graydon Hoare wrote:
Non on shared boxes. They might be cyclic, so it might not terminate.

We're no longer statically differentiating the cyclic from the acyclic.

Well, this prevents people from using the built-in "=" as the hash table
key comparison function in many cases (most commonly, if the key is
@str). I think that may violate POLS pretty severely.

I'm not saying I like this fact! Merely that between the two clearly-bad options of this POLS-violation and the possibility of == and < operators not terminating, I *think* I prefer the former.

You think it's better if we just tell users that the operators are always structurally recursive, and will explode (after, say, exhausting all physical memory, with our convenient extensible stacks) if applied to cyclic structures? I mean, that's certainly legitimate too; it's not like we protect users against other forms of infinite recursion in their own code. It just feels slightly more-hazardous in this case. Kinda a gut feeling; hard to justify.

(Others: feel free to chime in, we've been back-and-forth on this issue in conversation since ... years now?)

-Graydon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to