lua-users home
lua-l archive

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


On Sat, Aug 23, 2014 at 4:57 AM, Thiago L. <fakedme@gmail.com> wrote:

> You can override/overload == tho...

Okay, I messed up in my post.  I forgot that rawequal() in Lua exists
-- I have rarely needed it.

In Javascript == allows for type coercion, === does not.  Javascript
does not have metamethods.

I thought you were looking for a === in Lua that doesn't allow for
type coercion and that is already ==, but rawequal() prevents __eq
from firing assuming the types are the same.

So this post is about asking for a metamethodless == bytecode, as
rawequal() calls a C function.  I doubt you'll convince people we need
=== though :>