lua-users home
lua-l archive

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


On 30 July 2011 10:22, Mike Pall <mikelu-1107@mike.de> wrote:
> The FFI data types are strictly typed and behave accordingly. In
> fact, it's just a convenience that you can compare them with other
> Lua object types at all. Otherwise all such comparisons would
> return false.

This would match with the lua reference, which says

"Equality (==) first compares the type of its operands. If the types
are different, then the result is false."

Implicit coercions are definitely a convenience, but it means paying
the cost that use of the comparison operator can suddenly trigger
errors instead of returning false.

    henk