Einzelnen Beitrag anzeigen

Dejan Vu
(Gast)

n/a Beiträge
 
#8

AW: Klasseninstanz zur Laufzeit bestimmen

  Alt 2. Aug 2015, 15:59
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..
  Mit Zitat antworten Zitat