lua-users home
lua-l archive

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


Rebel Neurofog <rebelneurofog@gmail.com> writes:
>> Er, no, that's my point:  I often use ipairs or pairs like that, but it
>> feels awkward.  It would be nicer to not have a dummy variable.
>
> There is special name of _ for dummy variable:
> for _, value in ipairs (...) do ... end

It's still a dummy variable.  It still feels awkward.

> There's no special reason to add specific function iterating only over values.

Er, great, you have a different opinion... no prob with that.
But I think it feels awkward.

Mind you, I do think it's probably not worth changing the Lua
iteration API just to get rid of this little nit...

-miles

-- 
XML is like violence.  If it doesn't solve your problem, you're not
using enough of it.