lua-users home
lua-l archive

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




On Tue, May 19, 2020 at 2:04 PM Andrea <andrea.l.vitali@gmail.com> wrote:
So let's say we have decided to add the new keyword "const" (or something similar, it can be "local_const")
In the old program this new keyword is not used, therefore the old program will be able to run on the new Lua 5.4 interpreter.
And the new program will benefit from a cleaner syntax.

Here's a totally valid Lua 5.3 program using the correct variable name 'const':

local const = 3
print(const) 

Add the keyword 'const' and this program won't run. That's the general problem with adding new keywords.


Let me know if my understanding is correct.

    Andrea 

--
Andrea Vitali








--