lua-users home
lua-l archive

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


Hi Brian,

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
two modules.

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.

Regards,
Diego.