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?
Re: Mitigating the attribute proliferation - attribute inference for functions
Elie Morisse via Digitalmars-d Mon, 13 Apr 2015 15:46:50 -0700
Freeing D users from the burden of writing redundant attributes
that the compiler can infer would be a fantastic enhancement imo.
- Re: Mitigating the attribute prolif... Dicebot via Digitalmars-d
- Re: Mitigating the attribute p... Dicebot via Digitalmars-d
- Re: Mitigating the attribute prolif... Kagamin via Digitalmars-d
- Re: Mitigating the attribute p... w0rp via Digitalmars-d
- Re: Mitigating the attribute prolif... Steven Schveighoffer via Digitalmars-d
- Re: Mitigating the attribute p... Dicebot via Digitalmars-d
- Re: Mitigating the attribu... Steven Schveighoffer via Digitalmars-d
- Re: Mitigating the att... Dicebot via Digitalmars-d
- Re: Mitigating the... Steven Schveighoffer via Digitalmars-d
- Re: Mitigatin... Dicebot via Digitalmars-d
- Re: Mitigating the attribute prolif... Elie Morisse via Digitalmars-d
