4 ms·
I disagree, but in any case this is a better criticism than what's written in the original article. First of all, whitespace is the reality. The only relevant
by tomp 6y ago
I disagree, but in any case this is a better criticism than what's written in the original article.
First of all, whitespace is the reality. The only relevant choice is for the compiler to consider it, or ignore it. You're arguing "wrong whitespace is error" so I guess we agree there.
My main job is Python, and there's not a lot of work I need to do to fix the whitespace. It's literally a few Tabs / Shift+Tabs away! IDEs help a lot, the worst are REPL-like tools (Python's command line interface, or Jupyter) that fail to automatically remove leading whitespace in copy-pasted lines.
Python goes a long way to helping tools by having the `:` (colon) as "new block" signal. I personally think that's superfluous, and it should be done away with.
The broader point is, there are (or should be) techniques that eliminate these problems altogether; copy-pasting text is the problem - we should be copy-pasting AST instead. Same issues would happen e.g. in C++ if you copy-paste on `{` too much or too little... Copying AST instead of text would solve that as well.
- mercer 6y agoIt's easy to argue in favor of something if you can use hypotheticals that are unlikely to every come to pass. I agree with you that significant whitespace in Python is much less of an issue than many make it out to be, but arguing that using braces (or def..end, or whatever) is a stupid idea is going a bit far in the other direction. For me, at least, my dislike of Python's significant whitespace does put a bit of weight on the scale when I choose my language. Not much, but something.