Module naming conventions

Bill Baxter dnewsgroup at billbaxter.com
Sun Nov 18 21:48:46 PST 2007


Robert Fraser wrote:

>> *) Fine granularity approaching one-module-per-class means D's linker 
>> will generate smaller executables.
> 
> Can you elaborate on this one so I don't have to read the whole Phango thread? Why is this true? And there can still be one-class-per-module (what's one-module-per-class? A typo or am I misunderstanding something?) even with a lower-case module naming convention, so that's not really an argument for camel case.

Sure.  Sean Kelly wrote:
"""
I'll admit that I find this [module name to class name] correspondence 
most useful when dealing with Tango's IO package however, because it is 
so heavily modular.  In fact, this modularity is the reason there are 
few aggregate modules.  Tango is designed in a manner that largely 
avoids unused code being linked into an application by spreading it 
across multiple modules.  One may argue that block-level linking would 
mostly solve this problem as well, but it currently does not work with 
D, and things like static data, module ctors, etc, would not be omitted 
even with this feature.
"""

--bb



More information about the Digitalmars-d mailing list