Auto attributes for functions

uri via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 19 18:38:52 PDT 2014


Hi all,

Bit new to D so this might be a very naive question...

Can the compiler auto infer function attributes?

I am often adding as many attributes as possible and use the 
compiler to show me where they're not applicable and take them 
away. It would be great if this could be achieved like so:

auto function() @auto
{}

instead of manually writing:

auto function() pure @safe nothrow @nogc const
{}

cheers,
uri







More information about the Digitalmars-d-learn mailing list