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

H. S. Teoh hsteoh at qfbox.info
Thu Jul 27 19:34:09 UTC 2023


On Thu, Jul 27, 2023 at 06:55:25PM +0000, Paul Backus via Digitalmars-d 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`).

Opting out could be as simple as specifying at least one attribute
explicitly.  Where no attributes are specified, it should be inferred by
default.


> I have a half-written draft DIP for this that I plan to get back to
> once Mike Parker announces that the DIP queue is open again. If anyone
> else is working on this or wants to collaborate, please let me know!

This is awesome!  This is the right direction to go. Looking forward to
seeing this through the DIP process.


T

-- 
Tell me and I forget. Teach me and I remember. Involve me and I understand. -- Benjamin Franklin


More information about the Digitalmars-d mailing list