assume, assert, enforce, @safe
Kagamin via Digitalmars-d
digitalmars-d at puremagic.com
Fri Aug 1 07:33:21 PDT 2014
On Friday, 1 August 2014 at 07:01:49 UTC, Jonathan M Davis wrote:
> Since all template instantiations must happen when you compile
> your program rather than in any libraries you're linking
> against, why would it matter?
AFAIK, there's no distinction between a library and a program in
D, only modules and packages. How would it differentiate them?
And I didn't see any documented guarantee for template
instantiation optimization behavior.
> The compiler would never try to share any template
> instantiations across them. They wouldn't even be involved with
> each other until the linker was run on them, so the compiler
> wouldn't even have the chance to try and share anything between
> them.
Nobody cares about intermediate files, only what gets into the
final executable matters, and that is decided by the linker, and
it will remove redundant template instances.
More information about the Digitalmars-d
mailing list