lua-users home
lua-l archive

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


> cheia.load("std")	 -- OK
> cheia.load("std.bit")	 -- not understood in a meaningful way

Actually, I have no hierarchy, only convention.

require "foo.bar.baz"

just looks for file "foo.bar.baz" on LUA_PATH.

> One of the bigger headache is that luaL_openlib() expects a global table
> name, so supporting sub-namespaces in other people's libraries involved
> grafting in a bunch of external code.

But this isn't a problem for Lua libraries, only C libraries, and in a
large library you might well want a hierarchical namespace (but I agree
that hierarchies are more popular with designers than useful to
programmers).

-- 
http://www.mupsych.org/~rrt/ | robber, n.  a candid man of affairs (Bierce)