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.