DIP10005: Dependency-Carrying Declarations is now available for community feedback

piotrklos via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 22 05:09:50 PST 2016


On Wednesday, 21 December 2016 at 15:16:34 UTC, Andrei 
Alexandrescu wrote:
> On 12/20/2016 11:32 PM, Joakim wrote:
>> (...)
> I don't know how to make matters much clearer than the current 
> document. Any suggestions are welcome. The section "Workaround: 
> Are Local Imports Good Enough?" discusses the material cost in 
> terms of extra files that need to be opened and parsed (some 
> unnecessarily) in order to complete a compilation. The 
> "Rationale" part of the document discusses the costs in terms 
> of maintainability, clarity, and documentation.
>
>
> Thanks,
>
> Andrei

Stipulation: I think the difference of opinion may be caused by 
working on different sizes of projects in ones career (tens of 
thousands vs millions of LoC).

Suggestion 1: Maybe the DIP should point out that the cost of 
redundant imports (however small) tends to grow quadratically 
with code size (size of import tree times the number of 
compilations).
If this is not the case then maybe the DIP is really in the wrong 
direction.

Suggestion 2:
Implement the DIP, autogenerate millions of lines of D code (2 
versions: with and without DCDs) and see which version of DMD 
compiles them faster. This may also expose other ways to improve 
scalability without implementing this DIP.


More information about the Digitalmars-d mailing list