lua-users home
lua-l archive

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


> On Jan 28, 2018, at 1:24 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> 
> 2. In a for statement, allow extra conditons before the 'do'.
> 2a.
> 
> for _,item in ipairs(list) if type(item)=='table' do
> ...
> end
> 
> equivalent to
> 
> for _,item in ipairs(list) do if type(item)=='table' then
> ...
> end end
> 

-1 to all of #2

It won’t change runtime performance so far as I can see, and it appears to complicate the syntax for no gain other than not typing one or two extra keywords (“then” and “end”).

—Tim