lua-users home
lua-l archive

Re: Hashing on more than one attribute?

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


On 08/11/2012 10:42, joao lobato wrote:
I wonder if it would make sense to have __eq influence table hashing.
This works in Lisp only because the :TEST function must be one of the four predefined ones (EQ, EQL, EQUAL, EQUALP.) If you defined your own __eq metamethod, it would be impossible (in the general case) for the implementation to create a hash function consistent with it.

AltStyle によって変換されたページ (->オリジナル) /