[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: __eq operator behavior
- From: Axel Kittenberger <axkibe@...>
- Date: Wed, 30 Mar 2011 11:47:07 +0200
> u==v would have to iterate over every value to check equality.
> not u==v still iterates over the whole object
> whereas u~=v can bail on the first index (1~=2)
so can eq.
> In general, I'm not too sure about the merit of a __ne metamethod;
> 'a~=b' possibly returning a different result to 'not a==b'
In some logical systems it can be different. Like NaN! (or an equivalent of it)