lua-users home
lua-l archive

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


On Mon, Oct 19, 2009 at 5:46 AM, Morita, Bill <Bill.Morita@arrisi.com> wrote:
> Because everything is an object in lua, two separate instances of x=”abc”
> will generated different objects and>
> Thus a[x] = 1  cannot be retrieved by a later by a[x] where x was
> re-assigned (even to the same string).

Strings work fine as unique keys, because they are interned (there is
only one actual copy of each unique string kept).