lua-users home
lua-l archive

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


2018-03-13 1:25 GMT+02:00 Russell Haley <russ.haley@gmail.com>:

> I was merely imply that you and Dirk seem to have strong opinions on how to
> develop a standard Lua library and arguably have the credentials to do so. I
> think your post supports that thought.

Of course [1] we have strong opinions. They're the only kind of
opinion worth the name.

But actually I don't have any opinion at all on how to develop a
standard [extended] Lua library, I only have a strong opinion on what
it should look like. The typical module in it. I have no opinion on
how to achieve it.

Actually I can boil that opinion down to one sentence.

   It should look as if the Lua team themselves designed it.

Not even Roberto's and Luiz's own modules pass that test. LPeg is
fiendishly clever and exploits Lua's abilities to the full, but it
never feels as if you are using Lua — you are using LPeg. Luiz's
modules are Lua taken to the extreme: not just "less is more", but
"least is most", including the documentation.

The stuff that actually reaches Lua has been very carefully brought in
from those esoteric extremes to what the ordinary person can cope
with. There are tradeoffs, and most important, implementation details
are kept out of the manual.

Study Lua's io and os libraries. Scrutinize the new library functions
brought in at 5.3. Do likewise.

[1] Your comparison with Hubert J Farnsworth is apt.
[2] These are the ones where Lua is pushing right against the
constraints [3] imposed by adherence to standard C.
[3] Occasionally breaking out of them: "only available on some
platforms". The envisaged extended library will have to do that too.