lua-users home
lua-l archive

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



On Tue, May 19, 2020 at 8:49 AM Andrea <andrea.l.vitali@gmail.com> wrote:
 Why it has been decided to use <close> as a postfix attribute rather than a keyword such as local? 
A declaration/initialization like "const a = 1" looks cleaner than "local a <close> = 1"

The construct "local x <const>" is not valid syntax in previous versions of Lua (a "<" sign could not follow a variable name), so you don't break old programs with it. It's not the most elegant solution I have ever seen, but it does not break existing code. If you introduce a new keyword some programs will break.
 
--