lua-users home
lua-l archive

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

On Wed, Dec 16, 2009 at 1:11 AM, Tobias Kieslich <>
> I entirely agree on Lua missing stuff, generic libraries that make the
> implementation of common tasks easier.

One way is to clone interfaces from other libraries. Like I've used
the interface for Python's os.path module for Penlight's pl.path:

This doesn't mean I think this is the ultimate, or a standard, or
anything like that. It's just a convenient starting point, given that
lots of people have used this interface.

The ultimate test is whether all common path operations can be
expressed as one or two of these functions. Maybe we do need some
more, but they do need to be basic operations so the module can remain
compact and easier to remember.

(path.tmpname() is there because trusting os.tmpname() can let you
down badly on Windows, since it doesn't prepend an appropriate temp

steve d.