4 ms·
One of the biggest strengths of switch statement, falling through to the next case, unless there's a break, is missing. Of course, I can't think of a good examp
by bengerbil 6y ago
One of the biggest strengths of switch statement, falling through to the next case, unless there's a break, is missing. Of course, I can't think of a good example right now, but I've used it.
Of course, I've also used switch statements in do { .. } while (false), so maybe I just need to be voted off the island.
- sam_bristow 5y agoFalling through case statements bydefault has been the cause of so many bugs over the years. Fall-through can be a useful behaviour, but it's definitely a foot-gun.