lua-users home
lua-l archive

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


> 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)