> > > https://github.com/luvit/luvit/blob/c83252fcf2b085fb9c272425b008a829fe6879ec/test-tls.lua#L50-L71 > > > > Shouldn’t onAddress and onConnect be local? > > Also since “next” is a built-in function in Lua, it might be better to use > > a different name to avoid the possibility of hard-to-understand bugs in the > > future. > > > They are local. But since I like to write them in the order they happen, the > declarations have to be at top. I'm using luacheck in my editor to help > with scoping bugs. Its saved me so many issues and made refactoring less > painful.
Sorry yes, now I see the local definition above — sorry! Yes luacheck is helpful! -- You received this message because you are subscribed to the Google Groups "luvit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
