DIP 1038--"@mustUse" (formerly "@noDiscard")--Accepted

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sun Feb 6 15:56:32 UTC 2022


On Sunday, 6 February 2022 at 15:17:35 UTC, Paul Backus wrote:
> To be honest, though, I can see where he's coming from. When 
> writing DIP 1038, I made a conscious effort to avoid using the 
> term "non-`@nodiscard`", due to the double negative. With a 
> positively-phrased name like `@mustUse`, that problem 
> disappears.

And while I am at it, let me commit heresy by proclaiming that 
this feature is so important that I think it should be the 
default and that programmers should instead specify that the 
result is "discardable".

That would of course be a 
terrible-terrible-terrible-breaking-change, and would never fly 
in the current political climate.

But in general: D would become more interesting as a language if 
we could muster the guts to be different.



More information about the Digitalmars-d-announce mailing list