Mitigating the attribute proliferation - attribute inference for functions

weaselcat via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 11 19:07:53 PDT 2015


On Sunday, 12 April 2015 at 01:45:16 UTC, Martin Nowak wrote:
> 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.

I thought as much, that's unsettling because dmd is already 
starting to feel dog slow.


More information about the Digitalmars-d mailing list