lua-users home
lua-l archive

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


Sorry for top posting, but...

...could you please abstain from answering your own messages. This completely disrupts a thread flow and makes it extremely difficult to follow the different sub-threads. Especially when it is done repeatedly and "recursively".

Moreover, it is very bad netiquette and it's a technique that should be used only in "emergency circumstances" when one absolutely MUST correct/add something to his own post before anyone else has the chance of answering.

Thank you.

-- Lorenzo



On 08/06/2019 05:44, Philippe Verdy wrote:
Yes but Java requires the ";" terminator, so there's no ambiguity when
parsing, even if the annotation precedes all the rest of the statement.

In Lua, without the required ";" there will an ambiguity of parsing if the
annotation does not follow immediately a statement initial keyword (local,
function, for, return, if, then, else, begin...), or a "(" or "[" or "{".


Le ven. 7 juin 2019 à 18:07, Dibyendu Majumdar <mobile@majumdar.org.uk> a
écrit :

There is a big difference between all those syntaxes
[snip]
They are all prefixed to the whole item to which they
apply. Following their syntax, we should write '@toclose local x = 1',
instead of 'local @toclose x = 1'.


In Java the annotation precedes the type in a declaration; it being
classed as a type modifier in the grammar (this is one of the uses).
Lua of course doesn't have type declarations therefore annotations
cannot be placed in the same way.

Regards