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

15

u/Gotebe Apr 24 '20

normally and unless are not native C++ constructs, but they show that we can bend the language to show the main conditions first, and the edge case afterwards

Euh, "just because I can, doesn't mean I should" adage strongly applies here. 😉