Why people think it's a good idea (compared to other languages) is beyond me.
It's because it prevents other gotchas, and generally improves programmer productivity.
One of the things we teach in the first-level programming is how to indent code. That's because it's hard to read (and reason about) the structure of code without being able to see the blocks visually, through indentation. Since indentation is such a big visual clue, often when reading code that is mis-indented, one can have problems understanding what it does.
Code: Select all
int i = 0;
for (i = 0; i < 10; i++);
{
printf("%d\n", i);
}
I'd argue the mistake in the above code
the extraneous semi-colon
is moderately hard to spot - especially if this is a more complicated bit of code. By enforcing the equivalence of indentation and block structure, you make the code easier to understand.
The second reason behind the choice is that it allows one to fit more lines on the screen at once, by not spending 1-2 lines per block on additional punctuation. Since having to scroll up and down makes you a little less productive, reducing scrolling should allow for an increase in productivity.