lua-users home
lua-l archive

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


On Fri, Aug 25, 2000 at 06:10:14PM -0300, Roberto Ierusalimschy wrote:
> We hope to release Lua 4.0 beta by mid-September.

Cool!

> - `for' statement for tables: «for k,v in t do ... end»

Forgive me if this topic has already been beaten to death, but what is
the advantage of this new syntax over the old foreach, such as:

foreach(t, function(k,v) ... end)

?

I suppose it eliminates the need to refer to upvalues with the "%"
syntax, but what else?

- Christian