[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: On Lua and C Modules (was Re: [ANN] luafaq.org source on GitHub)
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 28 Jun 2013 18:32:11 -0300
> I'm surprised that Lua doesn't look for just
> 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  so as a fall-back, just calling luaopen() would seem to be
> obvious . 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"  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  is portable. IIRC,
we had problems in the past with some systems that signalled name
conflicts even with dynamic libraries.)