lua-users home
lua-l archive

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


Mark Hamburg wrote:
>
> Since this discussion seems to be sparked by the deprecation
> of ipairs, the other option to consider is whether there's a
> way to make the value fetch more syntactically lightweight.

Well, not that I would propose that for Lua 5.2 (it's a step
backwards) but I have three variants of the for-statement ;-)

  for k[,v] in t do ... end     -- pairs-like
  for [i,]v over t do ... end   -- ipairs-like
  for i=a,b[,c] do ... end      -- numeric

Ciao, ET.