lua-users home
lua-l archive

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


On Sun, Jul 12, 2015 at 5:20 AM, Peter Aronoff <telemachus@arpinum.org> wrote:
> Hi,
>
> I'm a little confused abut the changes to .__eq in Lua 5.3. Now that Lua will
> call the first .__eq found if *either* of the two operands to == has a defined
> .__eq method, some odd results seem to follow. In particular, == is now order
> dependent. x == y and y == x can return different results. Is this really
> desirable?

Consider that the operation wasn't commutative before, either, in the
case where __eq was defined on one and not the other.

/s/ Adam