removing default case requirement?

Walter Bright newshound2 at digitalmars.com
Sat Apr 1 07:23:32 UTC 2023


The design is so the user has to intentionally choose what to do with values not 
in the cases:

1. all cases are accounted for, so "final"

2. other cases are to get default handled, so "default:"

The person reviewing the code is never left in doubt as to the intention of the 
author of the switch.

Yes, it has prevented bugs in my code.


More information about the Digitalmars-d mailing list