Possible duplicate:
Why don't people set C ++ access specifiers / arguments?
I have a syntax question ... not about how, but rather about why. Many IDEs, such as Eclipse and Qt Creator, automatically fall back switchas follows:
Day randomDay = getRandomDay();
switch (randomDay) {
default:
case Monday:
break;
case Tuesday:
break;
}
I have always found that this is against the indentation rules of common code, and I prefer to do this:
Day randomDay = getRandomDay();
switch (randomDay) {
default:
case Monday:
break;
case Tuesday:
break;
}
Similarly, C ++ class definitions often fall back like this:
class MyClass {
public:
}
Unlike:
class MyClass {
public:
}
Why did some people choose not indentation in expressions case?
source
share