lua-users home
lua-l archive

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


On Tue, Apr 15, 2014 at 12:38 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> BTW the OP's website singles out Penlight, twice, as an example of what
> he does not like, but the author of Penlight has not taken the bait.

Well, that got me to RTFA ;)  My comment is that Penlight is not a
library, it is a collection of libraries organized within a namespace
(Rule #5)  If you need a powerful but eccentric command-line parser,
then pl.lapp; if you need a convenient LOM-to-XML pretty-printer, then
pl.xml, and so forth. I've tried to keep the inter-module dependencies
under control, and the documentation makes these explicit.

As for pl.func putting the function first, I remember that the first
definition of tablex.map put the function last (which is Lua
convention - and one that I prefer).  But then people said
(forcefully) that map should not work that way.

> Personally, I see Penlight as a module for those among the Chosen
> who are hankering after the fleshpots of Python. It serves very well
> for that purpose.

Pretty much the initial inspiration.  I've since tried not to follow
the big P so slavishly.

But, /a module/set of modules/g

Recently been rethinking the full-package idea and perhaps generating
a whole bunch of little rocks called pl-xml, pl-lapp, etc.  But
namespacing remains important, because we're already getting
collisions on the top-level and there's little extra typing involved
for users.

Finally, #6 - break the rules ;)