Please see my comment to the question. Such techniques are not related to "design patterns".
This is way too simple thing. Suppose you have
if (conditionOne)
if (conditionTwo)
if (conditionTree)
It is strictly equivalent to
if (conditionOne && conditionTwo && conditionTree)
Note the use of '&&', which is not the same as '&'. '&&' optimizes out redundant condition check, exactly as with nested "if". In contrast to that, '&' will perform all the checks. Not only it would be worse for performance, if makes some difference in calculation if those conditions are properties with
side effects (or they could functions, if I wrote
conditionOne()
instead of using the property syntax). That's why it is not recommended to create properties with side effect on
getters; and even less recommended to use properties of functions with side effects in conditional operators. (I hope you understand what is "side effect": something except just returning the value).
Please see:
http://msdn.microsoft.com/en-us/library/2a723cdk.aspx[
^],
http://msdn.microsoft.com/en-us/library/sbf85k1c.aspx[
^].
—SA