On Jun 22, 2022, at 11:08 AM, Ryan Starrett <pyryanggg@gmail.com> wrote:
On Wed, Jun 22, 2022 at 4:22 AM Egor Skriptunoff <egor.skriptunoff@gmail.com> wrote:A question about Lua coding style.Is it a good or bad idea to distinguish global from local variables by its uppercase / lowercase initial letter?Var=0 -- globalvar=0 -- local or upvalueNeither I'd wager. Seems like personal preference, and from that I'll sprout a case that an alternative naming style for globals appears ideal. Of course, you could also vouch for no naming changes and explicitly use _G to look up the global. Some may call this ugly, but it's about as explicit as you'll get haha.