lua-users home
lua-l archive

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


The topic is inspired by several recent threads, and may well have been
addressed on this list before.

Briefly, I think we do not need a Python-like standard library as much
as we need standards for those common tasks that tend to entice module
writers into inventing ever-better wheels.

The standard should be as sparse as possible, so that
  (a) There is not much that the user needs to know.
  (b) The quirks of particular existing implementation do not get
so fondly described as 'standard' that no other implementation
qualiifies.

For example, a module conforming to the 'json' standard should
be loadable as `json = require "bestjson"` and provide methods
json.decode (string to table), encode (table to string), and a unique
immutable value json.null. In this case it is obvious how the table
should look, but the standard should document it. Anything else is extra.

When it comes to XML, it is no longer so obvious (does the attribute
table go into [0] or a member named 'attr'? must the code/decode be
deterministically reversible?), so the foundation or user association
or benevolent dictator has some decisions to make.

We would not need subjective evaluations (this json/xml codec
is fast/reliable etc) but only objective ones (it conforms to the standard
interface, it passes this test).