4 ms·
Why did you find this interesting?
by rhelz 10mo ago
Why did you find this interesting?
- embedding-shape 10mo agoFor me it's interesting because global variable declarations haven't been needed before, so why now? Also, I'm not sure `global` was reserved before, but now it seems to be.
- TheCycoONE 10mo agolua does not preserve compatibility between minor versions. As such they don't need to reserve words for future use.
- mjmas 10mo agoThe point now is so that if you use a `global` statement in your code, Lua will now error on misspellings of local variables when compiling, rather than defaulting to treat them as globals.
- kevin_thibedeau 10mo agoIt indicates paving the path for local scoping in a future release where Lua 5 code is upgraded with global declarations to keep it working.
- NuclearPM 10mo agoWe have had local scoping for decades.