Wenn ich CleanCode haben möchte, dann nehmen ich so ein Routing-Dictionary
Kann man. Muss man nicht.
Zitat von
Robert C. Martin in 'Clean Code':
...is to bury the switch statement in the basement of an ABSTRACT FACTORY and never let anyone see it. The factory will use the switch statement to create appropriate instances ... My general rule for switch statements is that they can be tolerated if they appear only once..