HN user

87159377

0 karma
Posts0
Comments1
View on HN
No posts found.

switch($some_value) { case 1 : doSomething(); case 2 : doSomething(); break; case 3 : doSomethingElse(); break; default : doSomething(); doSomethingElse(); }

Is there any reason why keeping things simple is not an option? The number of possible outcomes in a switch case can often be so many that falling through would just be the route to complicated and difficult to manage code.