lua-users home
lua-l archive

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


>   I'm surprised that Lua doesn't look for just 
> 
> 		luaopen()
> 
> as part of the search mechanism.  It's a dynamic library---there is no
> problem what-so-ever in loading multiple shared libs with functions of the
> same name [5] so as a fall-back, just calling luaopen() would seem to be
> obvious [6].  I'm just curious as to why that wasn't done.  If it had, then
> it would be easy to move, say, "org.conman.env" [7] to another location.

Modules are not always linked dynamically (see, for instance, the
standard Lua libraries). With a single name, one would not be able to
statically link a set of modules to a program.

(Moreover, I am not sure your experience number [5] is portable. IIRC,
we had problems in the past with some systems that signalled name
conflicts even with dynamic libraries.)

-- Roberto