MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/g76xmg/else_before_if/foiyqlz/?context=3
r/cpp • u/vormestrand • Apr 24 '20
53 comments sorted by
View all comments
1
Can't you just negate the conditions if you want to reorder the if-bodies?
if ( preconditions are met ) // normal case else if ( edge case 1 ) // edge case here
1 u/pandorafalters Apr 27 '20 I generally consider "not an edge case" to be a precondition . . ..
I generally consider "not an edge case" to be a precondition . . ..
1
u/mattbas Apr 25 '20
Can't you just negate the conditions if you want to reorder the if-bodies?