lua-users home
lua-l archive

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


It was thus said that the Great steve donovan once stated:
> On Sat, Nov 23, 2013 at 9:11 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> > packages available for Ruby etc. And I say that if there are over 60000
> > packages in an ecosystem, there might as well be none.  You'll never find
> > the needle you need in such a haystack.
> 
> Once you get to that size, you absolutely need disciplined
> namespacing. Despite its faults, Java insisted on this from the word
> go.  Perhaps 5.1's module() confused the issue by making people
> believe that long qualified module names were just more awkward to
> use, whereas us modern users have got used to the 'local bob = require
> 'utils.xlib.bob' invocation.
> 
> I don't particularly mind all the JSON implementations, but they have
> a tendency to require 'json' - rather confusing for the reader!

  Which is why I started using a namespace for all my modules, based off how
Java does it---domain names.  My JSON implementation [1] is
"org.conman.parsers.json" and my syslog implementation [2] (I've seen I
think three other ones in the wild) is "org.conman.syslog".

  -spc (Although, if I were consistent, I would also use name spaces for my
	work-specific modules ... )

[1]	https://github.com/spc476/LPeg-Parsers/blob/master/json.lua

[2]	https://github.com/spc476/lua-conmanorg/blob/master/src/syslog.c