lua-users home
lua-l archive

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

Roberto Ierusalimschy wrote:
> This time, however, we would like feedback about the syntax for labels,
> because of the small incompatibility of the '@' with filenames.  (Note
> that "local name" and anything similar that mixes gotos with variables
> is not a *syntax* for labels and is completely out of our plans.)
> Some real contenders:
> 1) keep all as it is
> 2) change the indication of filenames in debug info and in LUA_INIT
> 3) ::label::
> 4) |name|
> 5) &name:
> 6) !name:

Another possibility might be "-:name:". The minus would be similar to a
dash for list items in written text, the first colon would be necessary
so it can be distinguished from a unary minus. (Though this was just a
quick idea and I have not checked it for other problems yet).


   if some_condition then
     goto label1
   some_code (blub)

Just some random suggestion though.

-- David