There are very old “formalisms” for trying to encapsulate extremely complex expressions that are evaluated by many, possibly independent variables, such as “decision tables”:
http://en.wikipedia.org/wiki/Decision_table
But, I join the chorus here to repeat the ideas mentioned about the wise use of the ternary operator, if possible, identifying the most unlikely conditions that, if they allow, allow you to complete the rest of the evaluation by excluding them first, and add ... the opposite is that ... trying to separate the most probable conditions and conditions that may allow you to act without testing cases of "fringe".
Miriam's proposal (above) is fascinating, even elegant, as "conceptual art"; and I'm really going to try it, trying to “copy” my suspicion that this will make the code harder to maintain.
My pragmatic side says that there is no answer “one size fits all” in the absence of an example with fairly specific code and a full description of the conditions and their interactions.
I’m a fan of “setting the flag”: this means that someday my application goes into a somewhat less common “mode” or “state”, I set the Boolean flag (which may even be static for the class): for me, it makes writing complex easier, if later, then evaluate.
best bill
Billw source share