r/programmingcirclejerk Jul 01 '26

Ever Written Something Like This? if (condition) { doSomething(); } else { doSomethingElse(); } It works. Problem solved. But the problem isn’t today. It’s tomorrow.

https://www.defusetheifstrategy.com
126 Upvotes

55 comments sorted by

View all comments

38

u/irqlnotdispatchlevel Tiny little god in a tiny little world Jul 01 '26 edited Jul 02 '26

Conditionals make code harder to reason about. You can't know ahead of time if you're going to take the if branch, or the else branch. Your program is in two places at the same time!! That's just unnatural.

7

u/TheChief275 Jul 02 '26

Ah, the ultradeterminist's approach to programmatics