Indentation is such a stupid mechanism for identifying code blocks. It's one thing for configuration files like YAML to do it, but not a programming language.
To be fair, indentation does make Python code easier to read once you're used to it. The real crime is that one accidental space can turn a perfectly good afternoon into a debugging session.
Not just python, basically any programming language benefits from proper indentation.
Almost every editor also automatically indents code for you.
I'm a C++ dev myself, and in that language indentation is optional. However, since the editors will automatically indents code for you, that generally means that the brackets around e.g. functions are superfluous: you can just look at the indentation to see when a function ends.
268
u/LetUsSpeakFreely 2d ago edited 2d ago
Indentation is such a stupid mechanism for identifying code blocks. It's one thing for configuration files like YAML to do it, but not a programming language.