lua-users home
lua-l archive

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


> (For the argument of "let's just everyone use foo/init.lua and avoid
> foo.lua instead", the fact that ?.lua takes precedence means that it is
> a more robust option; besides, many projects consist of a single
> file.)

My personal preference is to let ?/?.lua have precedence of ?.lua, simply to keep the higher level directory clean. All module related files (even if its only 1) reside in their own sub directory. It is not namespacing, but close to it and easy to achieve. So imo that is the more robust option.

I would even like an option for LuaRocks to automatically rename single file modules from 'xyz.lua' to 'xyz/init.lua' to enforce the behavior.