[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Lua hash algorithm
- From: "Curt Carpenter" <curtc@...>
- Date: Wed, 19 Jun 2002 09:57:56 -0700
> However, I cannot fathom why anyone would want to use
> floating point keys in a hash table. Integer indexes and
> string indexes make sense, but what is ` x[1.5] = "foo" '
> supposed to express? What languages besides Lua allow you to do that
> Anyway, to solve the problem with this (IMO) uncommon case,
> I think conversion from the floating point to a string would
> be the simplest solution. Perhaps Lua should do this internally?
A memory allocation every time you use a number as an index? No thanks.