You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This sort of thing is very useful for declaring variables that you know shouldn't change. Unfortunately, luacheck doesn't yet include a warning if you do something like the above, so it won't get caught until runtime.
What's the consensus here about using this new construct, assuming that your script requires RGP Lua 0.67 or greater? I'd like to start using it, but I'm a little hesitant without a warning from luacheck if I do something wrong. (Although testing ought to exercise all the pathways and hit the error at runtime.)
The text was updated successfully, but these errors were encountered:
I've started using <close> in the codebase, and I don't see a problem with <const>. FWIW, besides the lack of luacheck support, another issue is using them with ZeroBrane. The default install of ZeroBrane doesn't (or didn't) include Lua 5.4, so you had to fiddle with the configurations to get it to work with Lua 5.4 syntax. The built-in Lua is useful in ZeroBrane to catch syntax errors before actually running it in Finale. That is to say, its usefulness is limited but existent. I still don't have my ZeroBrane configured for Lua 5.4.
Lua 5.4 now supports const variables.
This sort of thing is very useful for declaring variables that you know shouldn't change. Unfortunately, luacheck doesn't yet include a warning if you do something like the above, so it won't get caught until runtime.
What's the consensus here about using this new construct, assuming that your script requires RGP Lua 0.67 or greater? I'd like to start using it, but I'm a little hesitant without a warning from luacheck if I do something wrong. (Although testing ought to exercise all the pathways and hit the error at runtime.)
The text was updated successfully, but these errors were encountered: