3 ms·
I still find switch statements easier on the eye than a chain of if-else-if-...else.
by oweiler 4y ago
I still find switch statements easier on the eye than a chain of if-else-if-...else.
- tristan957 4y agoswitch statements are better for certain cases since the compiler can warn if you aren't handling an enum variant within it.