Trying to use Mir ion, its a perfect example of the failure of D's attribute system

Quirin Schroll qs.il.paperinik at gmail.com
Fri Jan 20 10:18:39 UTC 2023


On Friday, 20 January 2023 at 00:31:54 UTC, H. S. Teoh wrote:
> […]
>
> In general, I think we should move in the direction of 
> expanding attribute inference as far as possible.  Nobody wants 
> to deal with attribute soup; it should be the compiler's job to 
> automate this tedium as much as possible and only leave it up 
> to the human when there's no other way around it.

I understand why Walter generally does not want inferred 
attributes for non-template functions. It increases build times 
and a non-template function simply *is* e.g. `pure` or not – it 
does not depend on anything outside the function or how it’s 
used. It would help if the compiler can be asked to inform you 
about sub-optimally annotated functions. It could be a 
compiler-flag (to check all functions compiled) and/or a `pragma` 
for checking on a per-module or per-function basis. It would list 
functions and the annotations they lack, but could have.


More information about the Digitalmars-d mailing list