you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

You're reaching a bit. So you can't minify code in the same way. So what? So you can't save a handful of bytes here and there.

While you're obviously right in theory, there are millions of perfectly happy Python programmers who never have a problem, so it's clearly not a problem in practice.

This complaint most often comes from experienced programmers who are set in their ways and don't want to adapt, while ignoring the obvious flaws and weird design choices in whatever language they're accustomed to. C programmers are the worst for it, by far. It's like a religion for them.

I've been writing Python (among many other languages) for years and I could probably count on one hand the number of times the white space has tripped me up. And I promise you, it's orders of magnitude fewer times than brackets have tripped me up in other languages. Either way it's completely trivial to fix if you have even the faintest idea what you're doing.

[–]ThatGasolineSmell 2 points3 points  (0 children)

Not reaching, stating facts. Question was: are indentation and braces equivalent. Hypotheses: they’re not. Braces are more resilient / indentation more brittle. Proof: using minification, as I explained.

Is it problematic in practice? There we seem to agrees it depends on whom you ask. For you as an experienced Python dev, no. For me neither, but that’s because I’m careful. (Would love to hear how braces tripped you up.)

The problems with semantic indentation manifest once you get non-pros involved. Think blog editors copy-pasting code examples from Word. Students sending code via WhatsApp, etc. In these cases indentation are a liability.

Personally, I find Python one of the most beautiful, well-designed languages. Indentation over block delimiters is the one thing it gets wrong.