lua-users home
lua-l archive

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


Shmuel Zeigerman writes:
> David Manura wrote:
> > New feature proposal for Lua: Module Execution Proposal
> I like this proposal. Here's a somewhat related proposal:
> http://lua-users.org/lists/lua-l/2006-01/msg00130.html

Thanks, that is now referenced in the doc.  That related proposal is less
general though, as it does not use all searchers in package.loaded but only what
is essentially the second searcher (the one that looks in package.path).  This
is analogous to the concern addressed in PEP 338[1].  For example, you might
want to make use of a custom searcher that loads Lua modules from a zip file
rather than the file system.  An additional difference is that the related
proposal uses a new search path (LUA_RPATH, or possibly named package.rpath)
that is independent of package.path.  I too question whether the added
complexity/maintenance of that offers sufficient benefit, and if it were done I
would default package.rpath to package.path, but that largely applies only to
the second searcher function anyway.

[1] http://www.python.org/dev/peps/pep-0338/