[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Desired Lua Features
- From: Tim Hill <drtimhill@...>
- Date: Mon, 29 Jan 2018 01:33:07 -0800
> 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