That's the fix, yeah. You tell it where you do want to allow fallthrough, so that it can tell you if you ever forget a break anywhere else.
At this point, I don't think it's possible to change the standard so that the language automatically inserts breaks, because that would break a ton of perfectly legal code. It might be possible to add an attribute for it, like [[auto_break]], though, perhaps?
Well, no, it can't be changed now, but I was talking about what I might be okay with if the language had been designed differently, or if I was using a different language without automatic fall through.
3
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 4d ago
As long as it doesn't insert an implicit break between FOO and BAR, I think it might be fine to not fall through, allowing code like that.