@safe pure nothrow compiler inference

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 29 08:00:48 PDT 2014


On 9/29/14 10:32 AM, Atila Neves wrote:
> So somehow I missed that for template functions the attributes can be
> inferred. From what I can tell it has to do with having the body
> available. But when not using .di files, why can't it be done for
> regular functions?

There was a push to do it for ctors, and require them to be available. I 
think this was actually discussed by Walter at one conference talk 
(maybe you missed it).

I think we should have an @infer property that would infer the 
properties and require the function body in .di (compiler would output 
it for .di generation also).

For various reasons, this all fell through.

-Steve


More information about the Digitalmars-d mailing list