The break requirements were for your protection.
But seriously, the reason for requiring breaks isn't that it's better,
but that it catches code that expects cases to fall through. People
are coming to Dart from languages with similar looking switch
statements with fallthrough. They might not realize that Dart doesn't
have fallthrough, and write code that expects it.
Without the break (or any other termination) requirement, code that
expected a fallthrough would not get any immediate error - the
following case would just not be executed. That would be a
hard-to-find error, whereas throwing a "case fallthrough" exception on
the correct source line should be easier to fix.
In the long run, it's possible (I can't say if it's probable) to
remove the requirement without affecting correct programs.
/L
--
Lasse R.H. Nielsen
l...@google.com
'Faith without judgement merely degrades the spirit divine'
Google Denmark ApS - Frederiksborggade 20B, 1 sal - 1360 København K -
Denmark - CVR nr. 28 86 69 84
Cheers,
Peter