lua-users home
lua-l archive

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


On Tue, Jan 4, 2011 at 3:34 PM, Dirk Laurie <dpl@sun.ac.za> wrote:
> I would have preferred some feedback on the real point of that
> post, which is that namespaces (module names, if you prefer)
> for possible additions to the almost-standard libraries that are
> being discussed, could be allocated before the code implementing
> them actually exists.

Absolutely, I think it's a valid approach. There are enough Lua
libraries out there that namespacing is becoming a problem. Most of it
is common-sense: even if you don't use LuaSocket, don't use the
'socket' namespace because that will conflict with most Lua
installations.

At one point we were discussing the vexing subject of putting extra
functions into standard tables; an example was os.sleep(), which can
be implemented on most platforms. The conclusion was that yes, but
only if the arguments of os.sleep(tm) were pre-standardized, e.g. that
tm should be in milliseconds [1]

In the context of current discussions, 'array' should become a
standard namespace.

A useful feature for any project-catalog site is for each project to
prominently show what module names it is providing. And being able to
search for a module (not a project) name would also be useful.
Although it would take some extra work, I've suggested also that
'luarocks search' be able to return results on module names.


steve d.

[1] cannot assume that Lua is always built with floating-point
support, etc. IMHO of course.