lua-users home
lua-l archive

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




On 29 March 2011 15:40, Kristofer Karlsson <kristofer.karlsson@gmail.com> wrote:
At the very least, it would be nice with some sort of explanation on why the shortcut for __eq was added in the first place.

Tables are references so to speak, two instances of the same table are the same table therefore when checking for equality of tables and they are the same instance it does not seem to make sense to call the metamethod. Maybe it is due to the repercussions of this not being the behaviour is the reason the metamethod is not called. Maybe the question is why would you want to change this?

' I'd either prefer the same shortcut to be added for __lt and __le'
These operators are not defined by default for tables.

Liam