Universal Function Attribute Inference
Sebastiaan Koppe
mail at skoppe.eu
Thu Feb 29 21:21:12 UTC 2024
On Wednesday, 28 February 2024 at 17:18:04 UTC, Paul Backus wrote:
> [...]
What about only doing inference when something fails to compile
due to a missing attribute?
Say a nothrow function calling a non one. Compiler detects it,
but before erroring out checks if the function is implicitly
nothrow and then continues accordingly.
Opting out can be done by setting incompatible attributes. E.g.
if I explicitly mark a function as system, no amount of inference
will enable it to be called from safe.
That way you can have almost no attributes anywhere except for
e.g. @safe on main and get safety everywhere or an error
More information about the dip.ideas
mailing list