Automatic attribute inference of functions

Sebastian Graf SebastianGraf at t-online.de
Fri May 31 02:52:09 PDT 2013


On Thursday, 30 May 2013 at 20:49:53 UTC, Steven Schveighoffer 
wrote:
>
> It's actually 4. separate compilation model.
>
>
> If you are building a module, and it imports a d interface file 
> which has no function body, there is no conceivable way to tell 
> what the attributes should be.
>
> For anonymous functions, and template functions, where the 
> entire function body MUST be present in order to use them, the 
> compiler can and does infer attributes.
>
> We would need to change the compilation model, and potentially 
> invent a new object file format/linker that tracks the function 
> attributes in order to have this work.
>
> -Steve

Makes sense, thanks.


More information about the Digitalmars-d-learn mailing list