lua-users home
lua-l archive

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

On Tue, Jun 24, 2014 at 8:59 AM, Thijs Schreijer <> wrote:

> -----Original Message-----
> From: [] On
> Behalf Of Hisham
> Sent: dinsdag 24 juni 2014 15:44
> To: Lua mailing list
> Subject: Re: [ANN] Lua 5.3.0 (work3) now available
> > Then given your (valid) concerns, "!.\lua\?.dll;!.\?\core.dll" seems very
> > reasonable to me. Because "core.dll" is common and lua inturprets "_" as
> > directories in the dll_exports name, nesting is a "thing" to deal with, no
> > matter what. The only place where this would be an issue is if a dll had
> > direct C entry points and as you say, that would be an application issue
> > that can be dealt with.
> Please no -- foo.core is a common pattern for C-based modules, but it
> is explicitly required with require("foo.core") in the Lua-based foo
> module. Making the "core" part of the name an implicit search would
> break modules everywhere, starting with LuaSocket. One shouldn't be
> "creative" with module paths like that; the naming hierarchy of
> modules, apart from the top-level modules in the standard Lua library,
> belongs to module authors.
> -- Hisham

Hisham is right here, naming those is up to the module author. But `!\lua\?.dll` should not be a problem as Lua files and dll's are different by their file extensions, so I don't see any reason why they could not be mixed in a module tree (apart from it being uncommon from a historic perspective).


I'm not following the concern here because I wasn't suggesting any change.

My point was that my reasoning behind not wanting to not nest DLLs was flawed, and is only valid when non-lua entry points are present in a Lua DLL (we have a logger library that does this).

My example was that often, a module author nests "core.dll" in a directory, so even if the CPATH was at !\?.dll, it would still end up nesting a good number of library DLLs, luasocket being a good example.

If your concern is that putting DLLs and lua files in the same search path would cause problems, I can happily report that it never has for me. The default Windows Lua  paths for LUA_PATH and LUA_CPATH overlap (both work with !\?.*) and so I put DLLs and .lua files in the same directory in all of my projects. I can't even come up with a way that it could be a problem or why this isn't cleaner than splitting them...