[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: absence of a __hash metamethod
- From: "James Shaw" <js102@...>
- Date: Wed, 14 Nov 2007 14:25:34 +0000
I see this was discussed a couple of years back in the thread "equals
metamethod and hash functions"
http://lua-users.org/lists/lua-l/2005-06/msg00108.html. Some
alternatives were suggested, mostly involving string building.
I'm using tables as keys for another table, and I'm re-generating the
tables when I need the keys (I don't think there's a simple way for me
to retain references to the original keys).
Coming from a Java background, I was surprised to find that there
isn't a metamethod for this in lua (unless there is and I haven't
found it, of course ;) I can probably work around my particular
problem if I need to, but I'm more interested in knowing about the
missing __hash function.
James