lua-users home
lua-l archive

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


On 15 January 2015 at 00:28, Tom Sutcliffe <tomsci@me.com> wrote:
> On a tangent now, but would such a change ever be considered, or are there
> performance impacts that make it impractical? Thinking about it some more,
> is this restriction ultimately due to there not being a way of changing the
> hash function of an object to comply with the different definition of
> equality in the __eq metamethod? That would totally make sense and I can
> understand that fast hashing is quite pivotal to Lua’s efficiency.

You're right, __eq wouldn't be enough for this for performance reasons.

This (old!) thread may be of interest:
http://lua-users.org/lists/lua-l/2009-02/msg00000.html

Regards,
Matthew