+ 6
In your opinion, what is the ugliest indentation style that you've ever seen?
Try to include what the style looks like in your answer so everyone else can cringe, too!
3 Respostas
+ 10
My favorite style is the K&R style, followed by Allman (which is how I originally learned in the 90s).
K&R:
if (x == y) {
x++;
foo();
} else {
x--;
bar();
}
ALLMAN:
if (x == y)
{
x++;
foo();
}
else
{
x--;
bar();
}
The ugliest indentation style, in my opinion, is the Banner and Pico styles.
PICO:
if (x == y) {
x++;
foo(); }
else {
x--;
bar(); }
BANNER:
if (x == y) {
x++;
foo();
}
else {
x--;
bar();
}
^ewwwwww :D
+ 1
1. A lack thereof.
2. Spaces instead of tabs.