FeedbackThread: DIP 1038-- at nodiscard--Community Review Round 1

Paul Backus snarwin at gmail.com
Wed Dec 9 13:08:36 UTC 2020


On Wednesday, 9 December 2020 at 10:49:32 UTC, Max Haughton wrote:
> On Wednesday, 9 December 2020 at 10:11:52 UTC, Mike Parker 
> wrote:
>> This is the feedback thread for the first round of Community 
>> Review of DIP 1038, "@nodiscard".
>>
>> [...]
>
> How will the cast semantics interact with @safe (and it's 
> family)? On the one hand @safe doesn't really affect 
> exceptions, but equally they are a different abstraction to 
> return values.
>
> Should I be able to cast away a @nodiscard return value in safe 
> code?

cast(void) is always @safe.


More information about the Digitalmars-d mailing list