Mitigating the attribute proliferation - attribute inference for functions
w0rp via Digitalmars-d
digitalmars-d at puremagic.com
Sat Apr 11 15:24:09 PDT 2015
Shouldn't the inference with analysis be possible when you have
the source available at least? You will still have to specify the
attributes in a .di file if you are statically or dynamically
linking to D libraries, but for source libraries or in parts of
your project, you should be able to perform that inference.
That would at the very least reduce attributes to the boundaries
of APIs.
// inferred
private void bar() {}
// inferred
private void baz() {}
@ngoc @safe pure nothrow
public void foo() { bar(); baz(); }
At some point in D, @safe should probably be the default, but
that's a whole problem in itself.
More information about the Digitalmars-d
mailing list