Hacker News new | ask | show | jobs
by tvb12 909 days ago
Even though it would make the language a little more verbose, I would love if Lua had a 'global' keyword and declaring global/local was required. With that one change, I think Lua would have the best implementation of scope out of any language I've used.
1 comments

Yes. My solution though is to just pretend that naked assignment isn't supported and don't use global variables.