[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: A word of advice against init.lua
- From: "Thijs Schreijer" <thijs@...>
- Date: Tue, 9 Oct 2012 22:23:35 +0200
> (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.