| ▲ | kace91 a day ago | ||||||||||||||||||||||
I like rust matching for this reason: You need to cover all branches. In fact, not using a default (the else clause equivalent) is ideal if you can explicitly cover all cases, because then if the possibilities expand (say a new value in an enum) you’ll be annoyed by the compiler to cover the new case, which might otherwise slip by. | |||||||||||||||||||||||
| ▲ | uecker 15 hours ago | parent [-] | ||||||||||||||||||||||
And I like using enums in C ;-) The compiler tells you to cover all branches. | |||||||||||||||||||||||
| |||||||||||||||||||||||