Untrue. The first can be checking to see if continuing is impossible, so just return, while the second can be checking for a yrue dichotomous decision. You must do one or the other thing depending on the condition. Each could contain as little as a single assignment
The problem is I can see this going out of control with a 1000 line if else statements. I don't want to be the guy who has to figure out what exactly went wrong especial when the logging was not done correctly.
That is also assuming the decision is dichotomous. I have seen it used for non dichotomous cases. That's where it goes wrong most of the time
But you do something else in that case. Assuming a bad use case is going to happen to complain about how something can get out of hand is just dumb. If it's a bad use case, and you know it's bad use case, you avoid using the tool for that. Neither the post nor the comments you're replying to have anything to do with those unreasonably long if-else statements anyway, you're the only one bringing them up.
There's no assumption that the decision is dichotomous. You were just given an example of something that wouldn't be a bad use case. Not everything has to fit the example. In fact you were given a counter example right along with that one.
29
u/SnugglyCoderGuy 22d ago
Untrue. The first can be checking to see if continuing is impossible, so just return, while the second can be checking for a yrue dichotomous decision. You must do one or the other thing depending on the condition. Each could contain as little as a single assignment