Re: Missing global warning in lua interactive mode
Roberto Ierusalimschy <[email protected]>
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <[email protected]> |
> P.S: I do realize globals survive across multiple lines. I just think it would > be a good idea for user to get a hint that his global definition has no usual > implications on the following lines when in the interactive mode outside of a > block. It is quite common that someone sees a piece of code, enters it line by line in the REPL, and then it doesn't work as expected because there is some local declaration in the code. The the "local" warning was added specifically because of that common scenario, not as some generic hint. The fact that "global" does not survive accross lines cannot change the meaning of some piece of code (or can it?), so it is not worth a warning. -- Roberto -- You received this message because you are subscribed to the Google Groups "lua-l" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/lua-l/20260207174738.GA32913%40arraial.inf.puc-rio.br.