[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: upcoming changes in Lua 5.2 [was Re: Location of a package]
- From: Shmuel Zeigerman <shmuz@...>
- Date: Mon, 25 Feb 2008 21:08:16 +0200
Thiago Bastos wrote:
Honestly, the only time I missed 'continue' in Lua was the first time I
tried to use it (and it was not there).
Since then I've always found 'else' + indentation a reasonable
alternative. If you have too many nested scopes, you should decompose
your code in subroutines anyway.
I'm a heavy C/C++ programmer (this means I'm used to 'continue') and the
absence of 'continue' in Lua doesn't bother me at all. It may actually
enforce good programming practices.
I also think the new scoping rule for 'repeat' is a good thing. Many
times the control variable is not used anywhere else, but you'd have to
declare it in the parent scope anyway. Lua allows you to 'encapsulate'
this variable in the loop's scope, which is nice.
There already has been a number of threads on 'continue' in the past,
with many pros and cons. I wouldn't like to restart that discussion once
again. Our opinions on this matter are obviously different, and that's
normal.
--
Shmuel
- References:
- Location of a package, Ignacio Burgueño
- Re: Location of a package, Tomas Guisasola Gorham
- Re: Location of a package, Ignacio Burgueño
- Re: Location of a package, Fabien
- Re: Location of a package, Roberto Ierusalimschy
- Re: Location of a package, eugeny gladkih
- upcoming changes in Lua 5.2 [was Re: Location of a package], Roberto Ierusalimschy
- Re: upcoming changes in Lua 5.2 [was Re: Location of a package], Shmuel Zeigerman
- Re: upcoming changes in Lua 5.2 [was Re: Location of a package], Roberto Ierusalimschy
- Re: upcoming changes in Lua 5.2 [was Re: Location of a package], Shmuel Zeigerman
- Re: upcoming changes in Lua 5.2 [was Re: Location of a package], Thiago Bastos