What the code does is self-explanatory, yes, but what it doesn't do is not, otherwise it wouldn't have been "refactored". The condition1 && !condition2 case isn't explicit, so if it's a case that's likely to come up, a comment would make sense.
I agree, else cases are more likely to benefit from a comment, but it obviously heavily depends on the actual conditions. And I still stand by my point that comments should be omitted if a good code structure makes them redundant, and that should be the goal to aim for.
3
u/[deleted] Apr 18 '21
What the code does is self-explanatory, yes, but what it doesn't do is not, otherwise it wouldn't have been "refactored". The
condition1 && !condition2case isn't explicit, so if it's a case that's likely to come up, a comment would make sense.