lua-users home
lua-l archive

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


I also agree that the "*xxx" or "*(xxx, params...)" syntax is very fuzzy and will not work with the future evolution of annotations

E.g. If you want to add annotations for subexpressions, it will create very bad situation like
  x = 1 + 2 * *nodebug( subexpression ).
  x = 1 + 2 * *(roundmode,tozero)( subexpression ).
It will be much more readable (and less likely to cause syntax ambiguities) like this:
  x = 1 + 2 * @nodebug( subexpression ).
  x = 1 + 2 * @(roundmode,tozero)( subexpression ).
Annotations are very productive features in modern languages, notably for code generation, maintenance, digital signatures and security, interfaces to other languages and platforms (let's remember that Lua is a language intended to be embedded), or design by contract and documented/supported interfaces, and software life cycle. It also helps compilers.


Le jeu. 25 avr. 2019 à 00:22, Dibyendu Majumdar <mobile@majumdar.org.uk> a écrit :
Hi,

I am writing about this again in the hope that it is not too late to
change the syntax of the *toclose attribute. I think there is an
opportunity to allow a general way of introducing annotations in Lua,
which can be exploited by extensions. It would be sad if that
opportunity is lost.

My previous post: http://lua-users.org/lists/lua-l/2018-12/msg00179.html

Regards
Dibyendu