5 ms·
I would like to learn Python and would like to like it, but the significance of whitespace is a huge turn-off.
by NonNefarious 4y ago
I would like to learn Python and would like to like it, but the significance of whitespace is a huge turn-off.
- xdfgh1112 4y agoThat's fine, I can't get past Go error handling either.
- cardanome 4y agoMost editors have a "show whitespace" option that you can you use.
- toyg 4y ago1998 called, they want your objections back. Consider the statement "I would like to learn C, but the lack of significant indentation is a huge turn-off for me". It has the exact same validity as your statement.
- NonNefarious 4y agoActually, it doesn't. In C, you can use indentation as you see fit; braces allow you to define code blocks and scope as necessary. That gives you both worlds. Python apparently doesn't. But stay smug.
- ptx 4y ago> That gives you both worlds. Or put another way, you're forced to specify the same thing twice: with whitespace for the human and with braces for the compiler, creating the possibility for these specifications to get out of sync. In Python, the compiler reads the same information you already put there for the human.
- kzrdude 4y agoThe charitable way to express it is that Python has significant indentation.
- jonnycomputer 4y agoIt's like saying you'd like to be able to read and write Spanish, and you'd like to like it, but using the upside down question-mark ¿ is a deal-breaker.
- NonNefarious 4y agoActually, it isn't. I looked up the significance of whitespace in Python and found examples of how it crippled the language: https://medium.com/star-gazers/pythons-significant-whitespace-problems-995fd6c17fd4 https://medium.com/star-gazers/pythons-significant-whitespac...
- Avamander 4y agoQuite a few of the problems the author has can be solved by a better editor.
- jonnycomputer 4y agoIt does encourage you to keep your functions and methods short. (:
- Sohcahtoa82 4y agoAny time I see someone complain about Python's whitespace as syntax, I see a person that probably poorly formats their code.