lua-users home
lua-l archive

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

Colin <> writes:
> I would guess that one of the reasons of the missing __hash meta event is
> that it's not that easy to design -- how do you make sure that the __hash
> meta event is "compatible" with the Lua hash function and the other table
> internals?

Not to mention a non-negligible speed hit in a rather critical area of
Lua!  Making table lookups slower makes _everything_ slower.

It would probably be much more acceptable if user-defined __hash hooks
were only used for tables with some flag turned on (which could be
tested very quickly in the C core), with that flag defaulting to off.


The car has become... an article of dress without which we feel uncertain,
unclad, and incomplete.  [Marshall McLuhan, Understanding Media, 1964]