very few programmers outside python don’t indent correctly
This is far from true. And there isn't even an established 'correct' indentation pattern, it's a style thing. You can easily have several developers indenting according to different styles.
I've seen several different styles of indentation within Python. Tabs vs. Spaces for instance. But when talking about spaces, there's many variations based on the number of spaces.
Of course, Tabs vs. Spaces is a topic of debate in all languages, so that factors out.
Whats left?
Well some people like their opening brace on the same line, like:
someFunction(){
and others like it on the next line:
someFunction()
{
Outside that distinction, braces don't affect coding style at all. Both languages can debate Tabs Vs. Spaces Vs. Number of spaces, so it's moot.
Python is one of many languages I work in, and outside Python I really don't run into problems with indentation. Anyone who thinks non-Python languages have indentation problems has psychosis.
In Java when you have a line length limit for checkstyle, it's not always clear how to indent when you add a newline character to roll over to the next line, so from this alone you can end up with wildly differing indentations.
In Java you could have all kinds of valid indentation for those rollover lines. It gets very messy when you have multiple layers of nested parentheses.
6
u/hextree Jul 25 '18
This is far from true. And there isn't even an established 'correct' indentation pattern, it's a style thing. You can easily have several developers indenting according to different styles.