4 ms·
One annoying thing about the war on case fallthrough at the language level is the lack of imagination. `continue` is a thing, compliments switch's existing `br
by MrStonedOne 7y ago
One annoying thing about the war on case fallthrough at the language level is the lack of imagination.
`continue` is a thing, compliments switch's existing `break` statement usage and is overall a much better solution for explicitly specifying fallthrough then returning special objects or c#'s abuse of goto.
- Spivak 7y agoI think it's a pretty syntax idea but it means continue works opposite your intuition inside switch statements compared to everywhere else. I mean you could kinda argue that switch could conceptually mean something like for matcher, block in cases: if matcher.matches(subject) or continued: eval block but then continue still feels magic since it bypasses the test.