lua-users home
lua-l archive

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


On Tue, 3 Apr 2012 16:30:09 +0200
Dirk Laurie <dirk.laurie@gmail.com> wrote:

> >
> > There is special name of _ for dummy variable:
> > for _, value in ipairs (...) do ... end
> >
> That's a perfectly ordinary name, not special.  it's merely
> a good habit to reserve that name for a read-never variable.
> 

Thanks Dirk,

I didn't know that, and always thought _ was a reserved word.

Now that I know it's an idiom for a read-never variable, everything
makes sense.

SteveT