From: Kevin Bullock Date: 2004-05-20T04:58:42+09:00 Subject: Re: Namespace and modules On May 17, 2004, at 11:34 PM, rolo wrote: > Using modules to define namespace is good and efficient? It seems to be effective. Semantically, though, there is a bit of weirdness in this idiomatic usage of modules. Modules define: 1. namespaces, within which symbols are referenced 2. mix-ins, which add behavior to another module or class These two distinct uses cause some "semantic shear," to paraphrase Neal Stephenson. Taking a different view, though, these two uses can be seen as the same thing. Modules are more than namespaces, and are thereby more flexible while still solving the same problems as namespaces. Thus it may not be Ruby that needs to change (to add explicit namespaces), but our perspective of it. I haven't fully thought through the module v. namespace distinction, but these are my current thoughts. Discuss :) Pacem in terris / Mir / Shanti / Salaam / Heiwa Kevin R. Bullock