4 ms·
That's good and dandy until one changes one case block to normal statements instead of a terminating one, forgets to add a "break;" and someone has a nightmare
by 1_player 6y ago
That's good and dandy until one changes one case block to normal statements instead of a terminating one, forgets to add a "break;" and someone has a nightmare debugging session trying to figure what is going on.
Go did good by making case blocks break automatically and requiring the "fallthrough" keyword in one of those very rare cases you need it do.