From: Robert Feldt Date: 2001-12-05T16:40:26+09:00 Subject: [ruby-talk:27531] Re: Package Naming On Wed, 5 Dec 2001, Dave Thomas wrote: > 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(...) > I think we should go with a "logical" module hierarchy. IMHO, its better than the java convention since I'd like my code to talk about what it does (and I find text/markup/xml more informative than com/foo/bar/SUPERDUPERXML) and not about organizations etc. > However, this solution has its own drawbacks. As a user, all these > long strings of names it pretty daunting. As a module writer, it's a > Ok, but IMHO clarity wins in the long run over brevity... > pain to refactor, and moving things around ends up affecting a lot of > source code. Also, until Matz gets > Ok, not sure how to adress this. > module Text::Markup > > implemented, you end up with a fair amount of additional indentation > in deeply nested files > > module Text > module Markup > module OutputFormatter > > class ToHtml .... > Not a major problem IMHO. > > So, what do folks think? Should we start implementing module > hierarchies, or is there a better way. Should RAA.succ enforce all > this? > I think so yes. One can base the hierarchy on Perl or on some of the classification schemes for CS papers. I have'nt got a link right now but'll try to find one. The idea is basically that one divides the CS knowledge into a hierarchy and people specify the areas their paper adress. However, they can specify multiple areas so maybe not the right way to go... Regards, RobertF