Developing a plan for D2.0: Getting everything on the table

yigal chripun yigal100 at gmail.com
Mon Jul 27 07:27:58 PDT 2009


Andrei Alexandrescu Wrote:

> yigal chripun wrote:
> > Andrei Alexandrescu Wrote:
> > 
> >>> Is it appropriate to define multiple classes, structs, templates, etc 
> >>> within a single module? What considerations should inform the decision 
> >>> regarding the placement of module boundaries?
> >> I think it's appropriate because many pieces of functionality come as a 
> >> bundle. The rule of thumb is, module provides the functionality, and 
> >> it's up to the designer to decide what that entails.
> >>
> >> Andrei
> > 
> > The rule of thumb above is good in theory but in practice such a given bundle of functionality can produce a 30_000 line file. while all those lines should be "bundled" conceptually together, D's restriction of module == file makes for a huge file that is a hassle to work with. 
> > 
> > yes, a "module" should represent a conceptual bundle of functionallity but forcing this into one huge file is wrong. 
> 
> I think public import can help with that.
> 
> Andrei

That is just a work-around and not a full solution. this is a weak spot in D which I'd like to see fixed. I've already suggested in the past some ideas on how this can be solved. 
we need a reasonable tradeoff between the namespaces design of C# which is completely seperated from physical layout (filesystem) and the packages design of Java which is tightly coupled with the filesystem. 



More information about the Digitalmars-d mailing list