Better HN
topnewbestaskshowjobs
Log inSign up

87159377

0 karma · joined Oct 7, 2010 (16y ago) · 1 submissions

Submissions

comment 16y ago · link · parent

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.