title: Lua - Reflection - function parameters and docstrings?
body: <p>I'm coming to Lua from Python.  I am using the Lua C API.  I wonder if there is a standard method to bundle some parameter and usage information with the methods and tie it to a standard <code>help()</code> or <code>&lt;method&gt;.__doc__()</code>-like method.</p>
  
  <p>Some ideas I had:</p>
  
  <p>1) somehow put the docs in library metatable and let the users use <code>pairs()</code>:</p>
  
  <pre><code>static const luaL_Reg lua_mylib_funcs[] = {
      ...
      {NULL, NULL}};
  </code></pre>
  
  <p>2) print some usage info when the methods are called with no parameters.</p>
  
  <p>3) create a <code>.help()</code> or a <code>.docs()</code> method for the library.</p>
  
  <p>Can someone point in a "Lua-ish" direction?</p>