|
|
|
|
|
by tomc1985
2074 days ago
|
|
I mean, that isn't exactly hideous code. Sometimes you need to check a variety of different conditions in sequence, and I don't think a switch statement works here. So what if they're different types? It's not like your passing those variables to functions right there. And are we really so robotic that we can't understand different types in a conditional? Except the recursive function bit. Why bother if its always false... |
|
Yes it did. Case blocks had several lines.
>So what if they're different types?
It makes it hard to read and destroys expectation of what possible cases there are. It makes it hard to test as a lot of test preparation/mocking is necessary.
>Except the recursive function bit. Why bother if its always false...
Yea, that the point! Because there was no test for it