|
|
|
|
|
by zelphirkalt
1259 days ago
|
|
One more thing you should consider in your argumentation is, that in non-whitespace-sensitive languages the programmer can make fewer mistakes when pasting code: It could be pasted at a completely wrong position of course, before some other expression or after some other expression, where it should not be. Aside from that however, the programmer cannot make a mistake by pasting it in a place, that is between 2 expressions, because that is one potentially huge correct position to paste that code. It stretches from the end of one expression to the beginning of the other expression. Anywhere in between the programmer can paste code. In contrast to that in Python and other whitespace-sensitive language, one has to be very careful about where to paste. Only in the case of pasting at the semantically correct indentation level (basically one tiny position in the code) can the editor/IDE/tool know how to indent things. Of course humans make mistakes and paste maybe 1 space to the left or right or even a whole indentation left or right of the correct position and then the tool cannot help you make your code do the right thing. It could be valid code, accepted by the compiler or interpreter, but still semantically wrong, doing something you did not want it to do. The tool cannot fix the pasting at wrong position mistakes made by humans in all generality, because it does not know the actual intention and it can be ambiguous what the result should be. I hope this makes a long discussion a bit clearer. |
|