[M3devel] external in module?

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Mon Feb 11 21:06:13 CET 2008


On Mon, Feb 11, 2008 at 06:19:59PM +0100, Olaf Wagner wrote:
> Quoting Tony Hosking <hosking at cs.purdue.edu>:
> 
> >Please -- no hierarchical namespaces.  Ultimately, they need a
> >definitive hierarchy anyway.
> 
> I wasn't going to write the code, so no need to worry.
> However, if this is not the solution we aim at, then we need to
> do something else about the increasing probability of the builder
> failing because some module in a completely different package
> which I don't even use directly happens to have the same name
> as my internal module and thus cannot be compiled. Or even worse:
> if I use two packages that happen to contain one module of the
> same name and have never been used together before.
> 
> Olaf

Packages are a lot like modules on a larger scale.  Maybe we should be 
able to syntactically nest modules?  And enable modules to export some 
of their submodules?  Or, if the source file gets unwieldy (it will!), 
use the nesting structure of directories as part of the syntax of the 
language?

Or, for another approach:

The various Eiffel implementations have separate module-interconnection 
language in which they get to collect modules into groups, and 
indicate some are internal to the group, and also things like <<Module 
foo that module bar imports is actually module foofraw from that other 
package over there">>, or <<The module foo that bar imports is 
the module foo from package uncle instead of the one from 
package aunt.>>.

They set this up with programming-language syntax, syntactic 
nesting, indentation, and so forth.  It seems to work, and you don't 
have to embed everything into an unweildy world-wide, global namespace.

But the different implementations seem to have grown their own 
interconnection languages :-(

-- hendrik



More information about the M3devel mailing list