lua-users home
lua-l archive

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


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