lua-users home
lua-l archive

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



On 02/05/2017 03:42 AM, Daurnimator wrote:
> Back when I was first starting with lua, I did find myself wanting
> relative require.
> However as time has gone on I wanted it less and less, and now don't
> have any desire for it at all.
> 
> I think the main desire for a relative require was a reluctance to
> name my projects while I was working on them.
> If I had a sub-module 'foo' that relied on a sub-module "bar", I'd
> have to name the whole project!

Me too. But I've implemented relative require for myself. And I still
cant accept need for absolute path when one module deep in file tree
calls neighbor module. It's like calling wife something like
"USA.Denver.Susan.D.Totten" with obvious need to change this name when
your family relocates, not only when you changes wife.

-- Martin