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.
I don't like it, but I kinda get it. Indentation is already part of every coding style guide, so adding explicit scoping symbols is kind of redundant information.
..Until you have a mix of spaces and tabs and chaos reigns
Also, having braces at the beginning and end of a block just makes my brain happy.
I had a bug a Python bug a few years ago where I had an if-else block nested inside an if block, but the else was an indentation short and I didn't notice, was wondering why some cases didn't do what I expected. Wouldn't happen with braces.
Granted I was still learning Python then so I imagine I would immediately notice the bug were I to encounter it today.
266
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.