I have recently joined the team that has a very peculiar coding guidance: Whenever they have an if block not followed by "else", they put a semicolone after the closing brace. The rationale is that it would signal to the reader that if there is an "else" below it, it belongs to the outer level "if" (in case the indentation is wrong). A small example:
if (condition1)
{
//do something
if (condition2)
{
// do something else
};
}
else
{
// do something as a negative response to the first if
}
I have not seen it before, so my question is - other than being an eyesore, is there any performance penalty for these empty statements at the end of the block, or they are just being ignored by the compilers? This is not a single or rare occasion, I am seeing these empty statements all over a file I am supposed to modify, one among many similarly coded...