Mitigating the attribute proliferation - attribute inference for functions

Martin Nowak via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 11 18:44:53 PDT 2015


On 04/12/2015 12:35 AM, weaselcat wrote:
> How does this differ from e.g, if the function was templated?

It doesn't, if you decide to analyze each imported function to perform
attribute inference, then that's just like treating all of them like
template instances.
This approach doesn't scale to bigger projects, because the compiler
always has to analyze the complete source code.
That's also the reason why an optimization was added to dmd whereby it
doesn't instantiate templates, that are already instantiated in an
imported module.


More information about the Digitalmars-d mailing list