lua-users home
lua-l archive

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


> Some real contenders:
> [label syntax]

I think, the current syntax is OK (as would be ::label::).

What is more important to me, is the syntax of the goto statement.

In my experience, it helps reading and understanding code if the
jump-statement gives a hint about the direction the jump takes,
forward or backward.  Usually, the intention of a backward jump is
to redo some code and that of a forward jump is to skip code - two
distinct concepts that should be distinguishable by the jump-state-
ment itself, not by some far away label statement.

If the jump statement gives a hint about the direction you don't
have to search for the label to get an idea of what's going on.
And if you want to locate the actual target, you already know the
direction you have to look.

I don't care that much about the actual syntax.  Some ideas:

 - "backto label"/"skipto label"
 - "goto <label"/"goto >label"
 - "@<<label"/"@>>label"
 - [fill in________________]

Ciao, ET.