DIP 1038--"@mustUse" (formerly "@noDiscard")--Accepted
jmh530
john.michael.hall at gmail.com
Wed Feb 9 17:40:31 UTC 2022
On Wednesday, 9 February 2022 at 16:21:24 UTC, Paul Backus wrote:
> [snip]
>
> In D, there is no existing word for this, so from that
> perspective both "mustuse" and "nodiscard" are equally valid.
>
> In other languages, there are multiple existing words:
>
> - C++17: [[nodiscard]]
> - C (gcc/clang): __attribute__((warn_unused_result))
> - Rust: #[must_use]
>
> If you are used to C++, then you will find "nodiscard" natural,
> and "mustuse" will require you to learn a new word. If you are
> used to Rust, then you will find "mustuse" natural, and
> "nodiscard" would have required you to learn a new word.
>
But what color should the bike shed be? ;)
More information about the Digitalmars-d-announce
mailing list