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

Guillaume Piolat first.last at gmail.com
Wed Feb 9 17:48:29 UTC 2022


On Wednesday, 9 February 2022 at 16:21:24 UTC, Paul Backus wrote:
> C++ is quite popular, but it is not the only popular language, 
> and there are many D programmers who have never used C++ at 
> all, let alone C++17 or later. Therefore, it is a mistake to 
> assume that all or even most D programmers have already 
> internalized "nodiscard", or indeed *any* particular word for 
> this concept.

There is also the Nim "discard" statement. I wonder why noone 
stole that feature. Feels more natural to me speak about the 
error being avoided, than a vague statement like "must use". 
C++17 is the most used language in the native space, so yes I 
think it takes precedence in the minds of native programmers. 
But, it is a level of bikeshedding I'm not keen on entering.



More information about the Digitalmars-d-announce mailing list