lua-users home
lua-l archive

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


Hi,

Diego, please enlighten us ... maybe this can be solved with
some restructuring.

First of all, my objections are not strong. We are simply discussing the
implications of all this new stuff. I am voicing some opinions and maybe
I spoke too loud.

Anyways, take socket.url as an example. It doesn't use anything from the
socket module. Should it be promoted to an independent package?

Right now, one can call require"socket.url" and get namespace for it,
without loading the socket module as a side effect.

With the new scheme, that would not be possible. The "socket" parent
package will be implicitly "required".

If "socket" knew that was the case, it could return nil and be done with
it.  I don't think this is complicated at all.

On the other hand, I will get over it if I have to and *I still prefer
the new scheme*!

I still think the hierarchical require() is the best solution for this
problem. And it solves other issues as well.

Such as collapsing an entire package (including its sub-modules) into a
single DLL, which we should encourage users to do in Windows.

Regards,
Diego.