[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re[2]: import and LuaBinaryModules
- From: Doug Currie <e@...>
- Date: Fri, 28 Feb 2003 17:40:33 -0500
I just saw the recent posts on LuaCheia about "setglobals() and
C-Functions" -- the Import solution is clearly superior to allowing C
modules to write the global namespace.
http://www.lua.org/notes/ltn011.html
Import provides a table to the module where the module puts its
bindings. So, the users can put the bindings in whatever "packages"
they want, including temporary/local ones.
e
Friday, February 28, 2003, 5:24:44 PM, you wrote:
> From: "Doug Currie" <e@flavors.com>
>> Wouldn't it be nice if the binary module semantics were the same as
>> import semantics? This would make binary modules less dependent and
>> less intrusive on a global name space. [Binary modules don't usually
>> have the circular dependencies problem.]
>>
>> Also, this would also make it possible for import to work with either
>> Lua or binary code. Should the user care how the import module is
>> implemented?
> Well, we are trying to tackle something like this with the LuaCheia project.
> A 'module' should be transparently loadable by the 'user' w/o any need to
> know if it is binary, script or otherwise...
> -Martin