[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why do we have ipairs?
- From: Paige DePol <lual@...>
- Date: Wed, 25 Jun 2014 11:58:50 -0500
On Jun 25, 2014, at 11:45 AM, David Demelier <demelier.david@gmail.com> wrote:
> Le 11 juin 2014 10:30, "Axel Kittenberger" <axkibe@gmail.com> a écrit :
> >
> > But a switch statement in most script languages (like in Javascript) is syntactic sugar for if/else! That has always been the argument from the Lua team to why there is no switch statement in Lua. Not like for example in C where it is in fact a computed goto.
> >
>
> Unfortunately it still does not explain why there is no continue in Lua but break exists. This is one of my major hate.
If you enjoy hacking and/or using a modified version of Lua then adding support for continue is very simple.
My switch/case patch has support for continue in loops, and I plan to release a separate patch for it as well.
~pmd
- References:
- Why do we have ipairs?, Thiago L.
- Re: Why do we have ipairs?, Andrew Starks
- Re: Why do we have ipairs?, Coda Highland
- Re: Why do we have ipairs?, Thiago L.
- Re: Why do we have ipairs?, Daurnimator
- Re: Why do we have ipairs?, Thiago L.
- Re: Why do we have ipairs?, Axel Kittenberger
- Re: Why do we have ipairs?, Jay Carlson
- Re: Why do we have ipairs?, Axel Kittenberger
- Re: Why do we have ipairs?, Andrew Starks
- Re: Why do we have ipairs?, Axel Kittenberger
- Re: Why do we have ipairs?, David Demelier