lua-users home
lua-l archive

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


On Mon, Jun 13, 2011 at 4:27 PM, Alexandre Erwin Ittner
<alexandre@ittner.com.br> wrote:
...
>
> A "label" keyword would be great too, but it will break so much code.
>
 I like this idea of a "label" reserved word. If I get correctly your
idea, it would be used as:
   ...
   goto xyzzy
   ...
   label xyzzy
   do_something()
   ...

- Yes, 'label' is a new reserved word, but 'goto' also.

- Reserving 'label' would break existing code but
(1) this is accepted for new versions of the language, and
(2) other changes may break more code (think about 'module()' removal)

- it goes well with the Lua "keyword-rather-than-Perlish-special
chars" approach,

- it fits well with 'label is a statement'

Phil