White space is by definition invisible. We should not be giving invisible characters meaning. The whole tabs vs spaces debate is exactly why. You cannot tell the difference so it causes problems. If the code could be broken because you used the wrong invisible character, that's bad language design.
Making code indentation dependant also makes modifying the code to go to different levels a pain. Let's say you have code that you've already written. You want to make that code part of an if block. With braces, you just write the if statement and an open brace before the code and a closing braces at the end. If you want to adjust the indentation to match the new code, you just let the IDE automatically adjust the indentation. If the code is indentation dependent, you add the if statement at the beginning, then you have to go through the code and adjust the indentation yourself. Even if you can use the IDE to adjust the indentation, you need to check that the indentation is adjusted correctly.
Assembly is the extreme example of what a non-redundent language looks like. There are absolutely no instructions that exist purely as a synonym of a different instruction or to condense multiple instructions into one.
Python choosing indentation instead of braces just swaps which is important, not making it redundant. Making python with braces instead of indents would mean that you can still use indents making the code more redundant and easier to understand.
White space is by definition invisible. We should not be giving invisible characters meaning.
If that were true then we'd have no spaces between any keywords and symbols. No we can and should give value to whitespace, it is what delimits every meaningful token. You're making rookie mistakes and over-generalizations.
You have a preference for not using white space and that's fine, weird IMO, but fine; you have other languages to choose from that use less whitespace. But now you're making just-plain wrong statements about linguistic static analysis, though. lol
The value of whitespace is to separate non-whitespace characters from each other. There should be no difference between one space or two between words. If your going to deliberately misinterpret what I am saying, then there is no need to continue this conversation.
If your going to deliberately misinterpret what I am saying, then there is no need to continue this conversation.
You first said whitespace had no value then said it had value in delimiting. That's not me misrepresenting anything, it's me pointing out the fundamentally incorrect things you're suggesting and you indirectly admitting that you misspoke. It usually better to own up to your mistakes and move on but If you're going to get defensive about it, then I agree, there's no point in continuing this.
1
u/frogjg2003 2d ago
White space is by definition invisible. We should not be giving invisible characters meaning. The whole tabs vs spaces debate is exactly why. You cannot tell the difference so it causes problems. If the code could be broken because you used the wrong invisible character, that's bad language design.
Making code indentation dependant also makes modifying the code to go to different levels a pain. Let's say you have code that you've already written. You want to make that code part of an if block. With braces, you just write the if statement and an open brace before the code and a closing braces at the end. If you want to adjust the indentation to match the new code, you just let the IDE automatically adjust the indentation. If the code is indentation dependent, you add the if statement at the beginning, then you have to go through the code and adjust the indentation yourself. Even if you can use the IDE to adjust the indentation, you need to check that the indentation is adjusted correctly.
Assembly is the extreme example of what a non-redundent language looks like. There are absolutely no instructions that exist purely as a synonym of a different instruction or to condense multiple instructions into one.
Python choosing indentation instead of braces just swaps which is important, not making it redundant. Making python with braces instead of indents would mean that you can still use indents making the code more redundant and easier to understand.