On 19 April 2014 21:29, Sean Conner <[email protected]> wrote: > > I've just finished writing the rockspec for org.conman.iconv, a wrapper > for the iconv() library call to transform strings from one character set to > another. > > Yes, the actual module is called "org.conman.iconv". The modules I write > I usually stick under the "org.conman" namespace and while this didn't go > over that well on the main Lua mailing list, it wasn't because of the > concept (namespaces are good) but the actual namespace used (org.conman). > I'm not sure how people here will react though.
I see absolutely no problem with that. The Lua world handles namespaces too naively, and that has led us to clashes in the past, and with core Lua even! Remember that in Lua 5.2pre bit32 was called bit? And now there are already `utf8` modules out there that are about to clash with Lua 5.3. I'm pretty confident that core Lua won't ever include a core module called `luarocks` or `luacov`, but I'd steer away from the "short, obvious names". [1] For Lua modules, I think the Java-like domain-style namespace approach works well (and I've used it in a recent project), even though there's the valid criticism that over time we end up with namespaces named after defunct companies (com.sun.*, etc.). It's still a valid namespace. If people don't want to go all the way reverse-domain-style like you did, at the very least, an `organization.module` or `project.module` style is be beneficial. For a second I thought I should blog about this, but then I remember that shooting at people who defend policies is a favorite pastime at lua-l... -- Hisham [1] Fun anecdote on namespaces: when I created GoboLinux, some people complained that I used verbose names such as /System for directories instead of more unixy names; years later the kernel created sysfs and took over /sys... a name that a lot of people told me I should have used back in the day. ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Luarocks-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/luarocks-developers
