4/29 Why were C and Java designed to require "break;" statements for a
"case" section to terminate rather than falling-through to the next
section? 99% of the time poeple want a "case" section to terminate.
In fact some compilers issue warning if there is no "break;" statement
in a "case" section. Why not just design the languages to have
termination as the default behavior, and provide a "fallthru;"
statement instead?
\_ C did it that way because it was easy to program -- they just
\_ C did it that way because it was easy to implement -- they just
used the existing break statement instead of having to program
a new statement with new behavior. Java did it to match C.
\_ I see. -- OP |