lua-users home
lua-l archive

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


On Thu, Mar 11, 2010 at 10:21 AM, Enrico Colombini <erix@erix.it> wrote:
> ...except when you change the type of an argument and have to edit variable
> names everywhere,

Well, that breaks the API so a little effort is needed. Our tools
should be clever enough to do this kind of thing these days.

> or when the same argument can have different types :-)

There you have me!  So often an innocent argument to a Lua function
can be either a number, or a string, or perhaps a table (with rather
flexible structure!)  I find documenting such functions to be awkward
using tools like LuaDoc - maybe from the point of view of the doc tool
(and the browser of the API) these are best _presented_ as overloads?

steve d.