[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Proposal: package.(c)path as tables
- From: Dirk Laurie <dirk.laurie@...>
- Date: Thu, 7 Sep 2017 13:14:38 +0200
2017-09-07 12:46 GMT+02:00 Martin <firstname.lastname@example.org>:
> I see a better way to manage list of directories. But don't consider
> this as argument versus proposal.
Sorry, you just shot yourself in the foot.
The most glaring difficulty in Lua at present is that working with
directories requires either os.execute with OS-dependent calls
to change the working directory, or manipulation of filenames
(i.e. precisely the sort of string parsing that the proposal aims
What we need is some abstraction layer bring directories into
the io or os library. I.e. on a system that doesn't actually have
them, make it feel to the Lua programmer as if it has.
This is much more urgent than pottering about with package.path.
In fact, once we have this, a better way than the current proposal
of working with a directory list will probably be staring us in the face.