I made a module autoloader for Lua.
I recently discovered PHP’s autoloading support, and it struck me as a really convenient idea: don’t worry about specifying every dependency of every module manually, just tell the language how to resolve missing references and let it take care of itself.
The only downside I can see to the approach is some lost explicitness, which can be valuable when you’re trying to figure out how a module works. I think the trade-off is worth it, though.
I just realized this is a million times better if you can define a module-scope initialzer function. So I added that.