lua-users home
lua-l archive

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


Ed <spied@yandex.ru> wrote:
> On 04/04/11 22:25, Frank Meier-Dörnberg wrote:
> >
> > as a singelton:
> > uniquekey = {}
> > anotheruniquekey = {}
> >
> > and later in the code:
> > map[uniquekey] = ...
>
> I think you should not use this in real program ;)

No, it's a very good idiom.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Tyne, Dogger: Southwest 5 or 6, increasing 7 for a time, veering west 4 or 5
later. Slight or moderate. Rain for a time. Moderate or good, occasionally
poor.