if (foo() && bar())
Does the program still execute bar() even if foo() is false? Or is it a better idea to write
if (foo())
    if (bar())
to avoid bar() from being called, if it is a heavy function, for example?
if (foo() && bar())
Does the program still execute bar() even if foo() is false? Or is it a better idea to write
if (foo())
    if (bar())
to avoid bar() from being called, if it is a heavy function, for example?
