removing default case requirement?

Dom Disc dominikus at scherkl.de
Fri Mar 31 21:27:29 UTC 2023


On Friday, 31 March 2023 at 21:04:52 UTC, Timon Gehr wrote:
> I prefer the current behavior.

Me too.
If you don't like default, use enums and final switch.
If you use switch over intergers, very often some values are not 
covered with cases, so even if you don't expect them to occur, it 
can happen. Therefore having a default case (that e.g. throws) is 
useful most of the time.


More information about the Digitalmars-d mailing list