removing default case requirement?
Steven Schveighoffer
schveiguy at gmail.com
Fri Mar 31 18:29:08 UTC 2023
On 3/31/23 1:25 PM, Ali Çehreli wrote:
> On 3/31/23 08:20, Steven Schveighoffer wrote:
>
> > But we have such a thing, in the `default:` case requirement.
>
> If we went with that change, I would probably feel the need to write
> comments like the following:
>
> // No default case
You can still write `default: break;` if you want.
>
> ... which would defeat the purpose. Am I fooling myself here? Because I
> don't know why I don't feel the same need for the 'if' statement.
I honestly think it's just habit. And I think that habit has to do
somewhat with problems that are mostly solved (from C and C++).
-Steve
More information about the Digitalmars-d
mailing list