lua-users home
lua-l archive

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

On Wednesday, September 4, 2013, Hisham wrote:

I for one miss "for k,v in t", as it is by far the most common
iteration pattern and IMHO deserved that special case (and there are
other places in the language where behavior changes if the value is a
function or a table anyway, such as __index in metatables and the repl
argument in string.gsub).

I'm not _saying_ I want it back, I appreciate the efforts for
orthogonality and minimalism... but I miss it. :)

-- Hisham

One would not like to be caught redesigning Lua on this list! :)

if i did, then I'd say that it would be nice if "for" received a table after "in", it would look for the "__in" metamethod and call it with the table as the argument. 

It isn't a big deal though, wich is why I won't wish for it publicly