Mitigating the attribute proliferation - attribute inference for functions
Elie Morisse via Digitalmars-d
digitalmars-d at puremagic.com
Mon Apr 13 15:42:18 PDT 2015
Freeing D users from the burden of writing redundant attributes
that the compiler can infer would be a fantastic enhancement imo.
For public functions I was thinking of a way to make inference
safer: generating a .di file with the inferred attributes and
auto substituted by the return type, and then make the compiler
check the inferred attributes against the previous ones and
trigger an error if there was an API breakage, forcing the
programmer to acknowledge it by removing the function from the
.di file, or by fixing the function to match its previous
signature. Would this make inference safe enough for public
functions?
More information about the Digitalmars-d
mailing list