lua-users home
lua-l archive

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

Dimitris Papavasiliou wrote:

> Metatables should simply include fields for every
> operation that can be performed on a Lua table or object
> with table-like interface [....] This includes:

>  * Greater than, greater or equal (I just noticed these
>    aren't there. Why?)

According to section 13.2 of Programming in Lua:

# There are no separate metamethods for the other three
# relational operators, as Lua translates a ~= b to not (a
# == b), a > b to b < a, and a >= b to b <= a.