From: Robert Klemme Date: 2010-08-31T23:37:17+09:00 Subject: Re: Namespaces too looooooong 2010/8/31 Iain Barnett : > > On 31 Aug 2010, at 12:54, Robert Klemme wrote: > >> Probably because the bugs you mentioned above happen too infrequently >> (or not at all) in practice. > > I'd have to disagree. Like I said, when I was looking for best practice on the topic and couldn't find it, I did find lots of people moaning about libraries breaking each other due to not bothering to wrap themselves in a namespace. Please note that my statement referred to bugs caused by not anchoring constant expressions in the global namespace - not about using or not using namespaces in general! > I even found a gem someone had written a gem that fixes other gems' namespacing. Now *that* sounds like something broken. Completely agree: that's ridiculous! > On 31 Aug 2010, at 09:25, Philipp Kempgen wrote: > >> Actually one of the few nice things about namespaces in PHP is the >> ability to import namespaces/classes using an alias. > > Much as putting a namespace in a constant is much better than what I had before, I like the idea of `as`, or of `alias` extending to namespaces. It reads better, IMO. Unfortunately for particular things you need a constant or variable - otherwise lookups won't work. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/