lua-users home
lua-l archive

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


> From lua-l@tecgraf.puc-rio.br  Mon Jul 19 10:57:22 1999
> From: Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>
>
> >From lua-l@tecgraf.puc-rio.br Mon Jul 19 13:31:59 1999
> >From: Adam Wozniak <adam@mudlist.eorbit.net>
>
> >Are there no "goto" or "label"s ?  Or did I just miss them?
>
> No, there are no "goto"s or "label"s.
> Do you *really* need them?

I don't think I *really* need my microwave oven, or my automobile,
but I find them convenient tools to have around at certain times.

"Djikstra considered harmful"

I don't think Lua *really* needs 'repeat' and 'if'.  After all,
'while' should be sufficient for doing everything these other
keywords do.  However, I sometimes find it convenient to use one
or the other, depending on what the task at hand is.

There are actually a small handful of algorithms where the code
actually does look cleaner with a 'goto' than it would with
other constructs.  Most languages have some kind of construct
for unconditional, non-returning branches.

--Adam