DIP 1038--"@mustUse" (formerly "@noDiscard")--Accepted
forkit
forkit at gmail.com
Wed Feb 9 20:28:07 UTC 2022
On Wednesday, 9 February 2022 at 17:40:31 UTC, jmh530 wrote:
> 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? ;)
Color is a perceptual experience, and its impact on psychological
functioning has been well researched.
More information about the Digitalmars-d-announce
mailing list