4 ms·
>Why are switches an anti-pattern? Because the gods of OO decreed as such and now the logic must be distributed across a dozen classes/files. Notice the langu
by flukus 7y ago
>Why are switches an anti-pattern?
Because the gods of OO decreed as such and now the logic must be distributed across a dozen classes/files.
Notice the language "that couldn't (or shouldn't) be solved in a more OO way", their goal is to create OO code, not simple to read and easy to change code.