if statement – short circuit evaluation vs readability
One natural solution would look like this: bool b1 = SomeCondition(); bool b2 = b1 || SomeOtherCondition(); bool b3 = b2 || SomeThirdCondition(); // any other condition bool bn = bn_1 || SomeFinalCondition(); if (bn) { // do stuff } This has the benefits of being easy to understand, being applicable to all cases and … Read more