[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: building a single lua binary with luasocket
- From: Diego Nehab <diego@...>
- Date: Fri, 3 Jun 2005 11:38:20 -0400 (EDT)
It took some time to understand that the luasocket C and lua modules
imported into the same namespace and that because I initialized the C part
first caused the lua part not to be loaded. That this needs documentation
and explanation I believe is incorrect when it can be made to just work in
both cases. I am certain that others will/have used time finding out this
and then fixing it in various ways.
This is only really a problem when there is a C module and a lua module
which import into the same namespace. Perhaps in this case a seperate
namespace could be used as a general principle?
I don't have a final opinion on this yet. It seems to me that the
end user should only care about the functionality, not about where that
functionality is implemented. Some things are much easier to code in Lua
than in C, and vice-versa. I see no reason not to have a split
implementation, like LuaSocket's mime and socket modules. The C and Lua
parts of thse modules should be considered as a single module, not as
In previous versions, this used to be much more radical. The
socket.select function actually had Lua and C parts itself.
I believe I now reached a more reasonable mix.