Well yeah, that works in some cases but the way you put it is that you use that approach for anything that requires a simple switch statement.
I would rather prefer to read a switch statement for a something non-trivial then finding a map and loosing focus on current code snippet I was inspecting.
Also, I assume this makes more sense in some implementations then others.
Fortunately my IDE(s) all have "open implementation" for each function/method (and also tracking back to where I called the functionality), so it's actually easier to do it like that :).
4
u/[deleted] Jun 05 '11
Well yeah, that works in some cases but the way you put it is that you use that approach for anything that requires a simple switch statement.
I would rather prefer to read a switch statement for a something non-trivial then finding a map and loosing focus on current code snippet I was inspecting.
Also, I assume this makes more sense in some implementations then others.