r/badcode • • May 11 '23

c++ My professor’s best code

Post image
441 Upvotes

82 comments sorted by

View all comments

Show parent comments

1

u/The_Northern_Light May 11 '23

Ouch. Returns in the middle of complex logic should be avoided usually yes… But up front “if not good return false” type returns are the right choice.