lua-users home
lua-l archive

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

> I understand the motivation for deprecating them, but is there thought to
> what the replacement is for:
>     table.foreach( t, print )
> It's a lot wordier to write:
>     for k, v in pairs( t ) do print( k, v ) end

Or compared to the lua 4 version

foreach(t, print)

Methinks the changes have not advanced the intuitive nature of Lua,
and there is a case for foreach being part of the "Basic Functions".

David B.