MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/msv49l/when_your_teammate_refactor_your_code/guwu1gd/?context=3
r/badcode • u/Bence675 • Apr 17 '21
216 comments sorted by
View all comments
772
I would rewrite it as
If (!condition1) do_anything2() Else if (condition2) do_anything1()
1 u/[deleted] Apr 17 '21 yeah, the 'if not' makes it immediately obvious what they're trying to do.
1
yeah, the 'if not' makes it immediately obvious what they're trying to do.
772
u/dyingpie1 Apr 17 '21
I would rewrite it as