lua-users home
lua-l archive

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


On Tue, Apr 05, 2011 at 08:19:19PM +0200, Ed wrote:
> On 04/04/11 22:25, Frank Meier-Dörnberg wrote:
> > Am 04.04.2011 18:57, schrieb Ed:
> >>
> >> Does anyone uses "table-as-key"?
> > as a singelton:
> > uniquekey = {}
> > anotheruniquekey = {}
> >
> > and later in the code:
> > map[uniquekey] = ...
> 
> I think you should not use this in real program ;)
> 
It has scriptural status: see “Programming in Lua” (unnumbered subsection 
called “Tables with default values” of Section 13.4, second edition, p125).

D.