Discussion Thread: DIP 1038-- at nodiscard--Community Review Round 1
Adam D. Ruppe
destructionator at gmail.com
Fri Dec 11 14:01:59 UTC 2020
On Friday, 11 December 2020 at 08:03:06 UTC, Guillaume Piolat
wrote:
> So, er.... I feel in the "target market" of this DIP
I think I'd actually use it for an entirely different purpose.
My cgi.d has a function called `schedule` that returns a plan
builder object but doesn't actually do anything with it. You're
supposed to actually build it then commit it. Like so:
schedule!some_operation.at(whatever);
The @nodiscard there could help when you've constructed the
builder, but didn't actually do anything with it.
Perhaps you'd argue a required named param or something is better
here but I still kinda like this.
> - a way to use exceptions in @nogc and even -betterC (There was
> a DIP for it, it was implemented, but doesn't work IIRC)
The -dip1008 switch.... sometimes works? i rarely use non-default
switches but i had success playing with it in small toys.
More information about the Digitalmars-d
mailing list