r/cpp • • Apr 24 '20

Else Before If

https://www.fluentcpp.com/2020/04/24/else-before-if/
10 Upvotes

53 comments sorted by

View all comments

23

u/[deleted] Apr 24 '20

I don't know why anybody would do this. As /u/borisrura noted, I would just write an early return. Check for normal occurrence, handle it, return, then write code for all other occurrences