This question already has an answer here:
A long time ago when starting learning programming I remember a teacher saying that compiler do not care about whitespace and they are useful to make code readable for human beings. It made perfect sense back then, but I only knew some Pascal and C++.
Many years later, after diving in many other languages I began wondering what is the rational of having programming languages that rely on indentation / white space, as there are quite a few disadvantages:
- Stange errors like this one (unindent does not match any oute indentation level)
- Minifying still requires extra whitespace - example
Many other reasons as indicated in this Quora post:
- lack of white space indentation across operating systems / text editors
- whitespace might be introduced while doing code merge
- possible errors while copy-pasting
- all modern IDEs automatically indent code
Question: Why do we still have programming languages that rely on indentation / white space?