I thought I'd sent this before...hopefully it's still relevant. Jim Weirich wrote: > > On Feb 25, 2009, at 12:23 PM, Brian Ford wrote: > >> When do you put one method in? If one method, why not two? Where are >> the boundaries in a library, framework or application? > > You should use a namespace whenever you add a method to a module or > class that is not part of your library. For example, Rake adds an "ext" > method to String. If selector namespaces were available, Rake would > scope that "ext" method in a Rake namespace. Allowing other > libraries/frameworks to also define their own independent version of > "ext" and allow users to explicit control which version they call. > > You should probably not use namespaces on modules or classes that you > own and control. Here's a perfect example, also based on rake: "import" JRuby added an "import" for Java classes that ends up conflicting with the "import" Rake uses. So we've had no end of hassle because we both want that top-level "import" name and both of them do drastically different things. If we had namespaces, people could have avoided this very easily: import "my_other_rakefile" using JRuby::Import import java.lang.System end As it stands, we had to add yet ANOTHER name to import stuff, "import_java". - Charlie