From: Rich Kilmer Date: 2001-12-06T02:50:39+09:00 Subject: [ruby-talk:27577] Re: Package Naming > -----Original Message----- > From: Thomas R. Corbin [mailto:tc@clark.net] > Sent: Wednesday, December 05, 2001 12:05 PM > To: ruby-talk ML; undisclosed-recipients: > Subject: [ruby-talk:27568] RE: Package Naming > > > Mark Hahn wrote: > > > > > I like java's dot-com convention. It absolutely guarantees no name > > clashes. > > I like it too. sometimes it seems clumsy, but then any > hierarchy can have > it's disadvantages. > Here is my problem with Java's packaging structure: file paths==namespace paths or com.blah.packagex.classy == com/blah/packagex/classy.class I think it IMPORTANT that we maintain a seperation between file/paths and namespaces (which Ruby does right now). require 'patha/pathb/filex' can have ANY module namespace in it. I think a combination of the file paths being based on a domain/other model: require 'com/domain/file.rb' And the module names(space) being based on the subject hierarchy: module Text module Markup module XML module REXML ... end end end end ...could then be loaded (for example) require 'com/sean-russell/rexml.rb' ...and "aliased" like this for ease of use. REXML = Text::Markup::XML::REXML p = REXML::Parser.new(file) Going further I would have a convention where the library creator creates an 'include' file "com/sean-russell/rexml.rb" that require'd the appropriate files from "com/sean-russell/rexml/xxx.rb". So if Sean were to create and additional library "com/sean-russell/wsdl/..." he would also have an 'include' named "com/sean-russell/wsdl.rb". -Rich