From: David Alan Black Date: 2001-12-05T07:08:47+09:00 Subject: [ruby-talk:27486] Re: Package Naming Hello -- On Wed, 5 Dec 2001, Dave Thomas wrote: > Right now, the naming of packages is something of a free-for-all: > people add their packages where they feel appropriate in the Ruby > library namespace. [...] > The Perl solution is to have a module hierarchy. My markup program > might be in text/markup/simple.rb, and users would do something like > > require 'text/markup/simple' > > m = Text::Markup::Simple.new(...) > > or > > require 'text/markup/simple' > > include Text::Markup > > m = Simple.new(...) [...] > So, what do folks think? Should we start implementing module > hierarchies, or is there a better way. Should RAA.succ enforce all > this? I'm not sure what we should do, but I'm sure that RAA.succ should enforce it :-) I can't think of a great alternative to module hierarchies, though such hierarchies tend to have an element of arbitrariness to them. Not through slopiness -- just because things don't always fall neatly into categories or name paths. It may be, though, that this would not matter too much if there were ways to index and search things that were orthogonal to the actual names. For example, if I'm looking for text processing modules, that could include XML-related modules. I could then just live with it if what I found happened to be called XML::Something::Whatever instead of Text::Something::Whatever. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav