lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> People tend to get organized and stick all of their variable
> "declarations" at the top of a file.  At the point where you're
> doing that, it's pretty easy to comment what it does or why you
> need it.  Otherwise people just start using a variable name and
> there's no explanation but context.  I guess it doesn't enforce
> it, but having all of your variables named in one place does let
> you see things more clearly.

You can force the issue by requiring a document string on the function that
declares the variable.