removing default case requirement?

Dom Disc dominikus at scherkl.de
Sun Apr 2 14:07:46 UTC 2023


On Sunday, 2 April 2023 at 10:33:28 UTC, Jack Applegame wrote:
> On Friday, 31 March 2023 at 21:24:25 UTC, Steven Schveighoffer 
> wrote:
>> If you "forget a case statement", or refactor it, forcing you 
>> to write `default: break;` doesn't fix that.
> `default: assert(0);` does.

Yup. I like that - much better default.
Except for assert(0) not providing any message. So if you run 
into this, it's still not obvious where to find the bug.


More information about the Digitalmars-d mailing list