Quote:
Originally Posted by xXziroXx
Using a switch for params is always a great idea. The main reasons for using a switch include improving clarity, by reducing otherwise repetitive coding, and (if the heuristics permit) also offering the potential for faster execution through easier compiler optimization in many cases. Has very little to do with personal preference, and more to do with optimization.
|
Not going to use a switch statement for only one or two possibilities.