I think more like some "1 page function summary in documentation style", e.
g. if you invoke "help(print)", or "help(for)", or "help(if)".
... and there should be some "standard way" to support library suppliers who
also want to supply such code for their lib functions, e. g.
"help(lib.func)" or so ... ("help(string.unpack)", ....) .
.. the important thing would be, that it is somehow very simple invocation
like "help(...)". ... if the user would need some more "sophisticated trick"
to find variable information, then I think it would not be too useful... .
I think in many lua applications (e. g. lua on "large systems" like Windows,
Linux, Android...), the "static size" of the code of lua is "ridiculously
small", and in such case it really is no load at all, to include all such
"function documentation" in the code.
In "controller applications", where storage space is sparse, of course this
"including help info into code" should be switched off easily. And it would
be very nice, if such "static help info" really then is linked to ROM in
case controllers supporting ROM / RAM separated memory (e. g. RISC
controllers).
That's why you put the help function in a module. Include it if you need it. Leave it out if you don't.
Python does it this way but the interactive interpreter loads it by default.
/s/ Adam