From: Iain Barnett Date: 2010-08-31T13:22:40+09:00 Subject: Re: Namespaces too looooooong On 31 Aug 2010, at 03:29, Christopher Dicely wrote: >> Going back in time would be cool if it was in a time machine, but throwing out the good things learned over the >> years about things in computing seems the wrong way to do it. > > Is using deeply nested modules in such a way that a consumer of the > module would be expected to reach deeply into the nesting structure a > "good thing" though? It seems to me that deeply nested modules work > best where the deeper layers are used by the higher layers, not by a > external consumers. > I completely agree. But, if you can find me a good article on how to use nested modules as namespaces in a library, and how to refer to different parts of the module from within and without, including writing tests for it and how rake will interact with the changes, and includes all the different ways it will affect `require`, while avoiding many more articles that complain about libraries polluting the global namespace and stomping all over each other then I'll also agree not to look on comments like "use them less" as an encouragement to be disorganised and more as an invitation to use a facade :) Because I tried, and there's bugger all out there. It's no wonder there's been a problem with clashing because it appears that those who know how to avoid it haven't bothered to tell anyone else. That's not the best way to encourage best practice, IMO. Regards, Iain