From: David Alan Black Date: 2001-12-06T02:16:33+09:00 Subject: [ruby-talk:27569] Re: Package Naming Hello -- On Thu, 6 Dec 2001, Thomas R. Corbin wrote: > Bryan Murphy wrote: > > > Now, I don't see why Modules and Namespaces have to behave exactly the > > way they do. Why not something like this? > > > > module MyXMLConfigModule > > module_alias Text::XML::MyXMLConfigModule > > module_alias XML::Text::MyXMLConfigModule > > module_alias Configuration::Tools::MyXMLConfigModule > > end > > > > require 'Text/XML/MyXMLConfigModule' > > works the same as > > require 'XML/Text/MyXMLConfigModule' > > > > ? It would of course require some changes to Ruby, and some care would > > need to be taken on behalf of the module maintainers, but the module > > maintainers already do that anyway. At least those modules that got > > into some sort of standard library could be guaranteed to be consistent. > > You could also do something for your apps like uninstalling > > XML::Parsers::REXML, and replacing it with your own library that is > > interface compatible and aliases to XML::Parsers::REXML even though it > > isn't REXML. > > I really like your idea. It looks like it would add a lot of flexibility > to a system. Of course, it could be abused, but then so could many things. > I'd love to see your idea in ruby. It could certainly be abused. I'm trying to think of a situation where it could just be *used* :-) If someone's written a drop-in replacement for REXML (or any other large library or application of general interest), it seems to me that that person would probably (I hope) want to share the new implementation. That, in turn, would encourage whoever's written the program that uses it to modularize their program so that either of the two compatible auxiliary libraries could be used. Or am I being too Utopian? I suppose there may be examples of things like this being done usefully, like MooTiff (which installs itself as libXm*), though actually I don't think that's the same scenario. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav