I have a friend that isn't 100% blind but he's close. he's a developer and I've never heard him complain about indentation. In fact, I've never heard him complain ever; a true inspiration.
Python was designed to use (newline followed by) indentation instead of braces, parenthesis, semicolons, etc. For those that know what happens from code to machine language you know both aren't necessary. I'm sure it's no stretch to say having more than one option is not feasible either. And if you try to tell me other languages use braces and indentation you don't understand what's going on. Not to mention Python has the PEP8 style guide.
Adding another option, specifically braces, is simple. There already exists a transpiler from Bython, literally Python with braces, to Python. Now it's just a matter of modifying the actual C parser instead of having it at a higher level.
The Python style guide is irrelevant to the writability of code by people with visual disabilities.
very few programmers outside python don’t indent correctly, so this is pointless.
I don't think the downvotes were from python fanboyism, but from that comment being obviously incorrect. If that's what you've experienced, then you're lucky.
If you can't write code with proper indentation unless the compiler interpreter forces you to, you're a moron. This feature is pretty damn pointless on Python, but I like other things about Python.
I always wonder why people feel so strongly about this. I agree, it's easy to get indentation right... so what's the problem? Who cares that it requires you to get the indentation right? Your experience won't change at all if you're not screwing it up.
If I had to rank language design decisions in terms of importance, I think whitespace vs curly braces would be one of the last items on the list. It just happens to be one of the simplest topics to understand which makes gives it a low barrier to entry for absurdly passionate stances.
Only Python coders are so obsessed with indentation. For every other language it's par for the course. Many people replying to me make it seem like Python is a sanctuary of proper indentation, and any code written in other languages is chaos with no indentation at all.
It's not hard at all to get indentation right, and for all the great things about Python, it's strict enforcing of indentation is not one of them.
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.
Have you looked at CPAN modules lately? hell look at the majority of javascript even. (Yes "full-stack"programmers are still programmers). Easy to devolve into unread-ability is one of the reasons why most people hate Perl now. (There's a reason why "perlmonks" is literally a thing.).
Braces encourage laziness. How many ajax calls have you seen where it's all crammed in on a single line? I have to deal with that shit every day. If they'd been forced to indent, they would have factored out their nested callback hell ages ago, but here they're content relying on an IDE tracking the number of braces they're inside of.).
Perl is horrible. I don't think braces encourage laziness, at least I've never really seen it. It's not hard to get braces right.
JavaScript is a hack to begin with, even when written well it's making the best out of a shitty situation.
Even when there's call back hell, I still see proper indentation for nested callbacks...
And besides, JS engineers (worth their salt) love their promises, specifically to avoid that. Soooo... only n00b JS coders would have call back hell to begin with, and the worst of the worst wouldn't properly indent it.
10
u/saulmessedupman Mmmm spam Jul 25 '18
Python forces readable code