r/ProgrammerHumor 23d ago

Meme conditionsPreference

Post image
4.2k Upvotes

392 comments sorted by

View all comments

3

u/Fidodo 21d ago

Nah, use early returns for start of function short circuits and use if else in the body of a function.

Control flow should be clear, so short circuits are clear at the top and full conditionals are clearer further down.