lua-users home
lua-l archive

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


Hi all,

RL> My point is that if the interface is properly defined and documented, 
RL> and accepted, it can be included in a standard library even as a stub. 
RL> If the interface is not properly defined and documented, things are a 
RL> mess wherever the library goes. Requiring well-written and 

I like the idea of defining interfaces for generally available
functionality that is not implemented in the same way on all
platforms. This would also allow for a "lua" way to do it, instead of
mimicking a single OSes interface to some functionality. Directory
access springs to mind... there are OSes which do not have the '.' and
'..' members of a directory, but nonetheless can find the parent of a
given directory. So relying on the presence of those entries requires
hackery on those platforms.

Encapsulating the concept of a directory and defining a set of
operations on it, such as finding the parent directory, would allow a
natural use of these from the lua side. The other major benefit of
this would be that for your application these functions might be
implemented to operate on something entirely different, but from the
lua side you could still use the predefined interface. 

Plus, as Rici points out, developers would not have to document these
interfaces over and over again, because they are already (hopefully
well) documented. And proper documentation is one of the major
shortcomings when it comes to free software. Somehow the "Use the
source, Luke" attitude still prevails.

Just my 0.02?

Gunnar