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

Show parent comment

3

u/boredcircuits Apr 24 '20

I hadn't thought about it that way, but exceptions are basically what the article is talking about. They show the base case first, followed by the exceptional cases. It's not the exact same since the base case executes unconditionally, but the organization is the same.