lua-users home
lua-l archive

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

On 09/07/2017 05:10 PM, Roberto Ierusalimschy wrote:
> Another argument is that it is simpler, both to explain and to
> implement. The concept and the handling (and the documentation) of
> string pathes are unavoidable, because that is how they exist outside
> Lua (e.g., in environment variables).

I don't think that "sequence of paths" is harder to explain to Lua programmer
than "string with delimited paths".

On 09/07/2017 05:10 PM, Roberto Ierusalimschy wrote:
> With the change, we get two
> concepts (and two representations to be manipulated and documented) for
> the same thing.
> -- Roberto

Yes, here is real problem. At the time when "path" and "paths" will coexist,
changes to one of them must be mirrored to other. I don't see elegant and
lightweight solution for this.

But this facilities can be made independent: module is searched in
"package.paths" (TY Oliver for name), then, if not found, "package.path"
string is processed.

This manner documentation for sequence "package.paths" be independent
from "package.path" (except text describing order in which these entities
are processed).

-- Martin