From: Eric Armstrong Date: 2006-07-14T15:51:32+09:00 Subject: Re: Module Definition Idioms Rob Sanheim wrote: > On 7/13/06, Eric Armstrong wrote: >> >> file: parse.rb >> -------------- >> module HTree >> def HTree.parse >> ... >> def >> >> def Comment.parse(raw_string) >> ... >> end >> >> end # module >> --------------- >> >> What makes that a desirable way to structure >> things? > > Probably to define the module HTree as the top level namespace. > "Text" and "Comment" are pretty common names for classes/modules, so > putting them inside an HTree module puts them in their own namespace > and keeps everything organized. > Aha. Module as namespace. That rings a bell. Thanks.