Our template emission strategy is broken

Martin Nowak via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 11 06:12:58 PST 2015


On Wednesday, 11 November 2015 at 13:08:08 UTC, David Nadlinger 
wrote:

We're well aware of the template problems and FWIW the most 
important step is to simplify the current implementation (not the 
rules).
http://forum.dlang.org/post/55F07E92.7040104@dawg.eu
Once that is done and we have a clearer understanding of what the 
problems are, we could rediscuss the emission rules.

Ultimatively the decision to instantiate/emit as few templates as 
possible sped up compilation a lot but basically means -c with 
multiple objects will never work reliably.
Compiling separate objects is a C++-idiom anyhow and doesn't make 
too much sense for D. Instead separating your codebase into 
packages with little interdependencies and always recompiling 
those packages when something changes should be the preferred way.



More information about the Digitalmars-d mailing list