On Wednesday, 19 October 2022 at 01:49:26 UTC, mw wrote:
On Wednesday, 19 October 2022 at 01:38:27 UTC, Adam D Ruppe
wrote:
On Wednesday, 19 October 2022 at 01:34:54 UTC, mw wrote:
Is there any (design) doc about this?
scroll up, click the link from this very thread.
https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1038.md#design-goals-and-possible-alternatives
"""
Rather than make either sacrifice, this DIP proposes a design
that allows both rigor and simplicity to be maintained, and
reserves the possibility for a future DIP to allow @mustUse as
a function attribute.
"""
Another future DIP? I think this DIP is flawed for not using
"@mustUse as a function attribute"
@mustuse as a function attribute was in the original version of
the DIP. It was vetoed by Walter. Thus, only the type attribute
remains in the accepted version.
FWIW, this is the same path that #[must_use] took in Rust. It was
added originally as a type attribute only, and later had its
usage extended to functions.