Yearly "can we please have void foo() auto" post

Paul Backus snarwin at gmail.com
Thu Jul 27 19:27:26 UTC 2023


On Thursday, 27 July 2023 at 19:21:40 UTC, jmh530 wrote:
> On Thursday, 27 July 2023 at 18:55:25 UTC, Paul Backus wrote:
>> IMO the correct solution is to just make the compiler infer 
>> attributes like `@safe` for *all* functions, with exceptions 
>> only in cases like `extern (C)` or virtual class/interface 
>> methods where the full implementation is not available, or if 
>> the user explicitly opts out (e.g., with something like 
>> `@noinfer`).
>> [snip]
>
> Or if the function doesn't have a body?

Yes, naturally. Here's what I've got written down so far:

https://github.com/pbackus/DIPs/blob/universal-attribute-inference/DIPs/1NNN-PJB.md


More information about the Digitalmars-d mailing list