3 ms·
I agree. In Go break is the default, and there's an explicit 'fallthrough' statement.
by lubutu 14y ago
I agree. In Go break is the default, and there's an explicit 'fallthrough' statement.
- joshAg 14y agoGo was not designed to be portable assembler. break directly maps to a jump statement in assembler. fallthrough does not. Since C is designed to be portable asembler, it makes sense to include break as a keyword instead of a fallthrough keyword (and break would still be needed anyway for for loops and while loops).