3 ms·
I like significant whitespace in Python, and wish other languages used it instead of brackets or whatever. There, I said it!
by kwertyoowiyop 5y ago
I like significant whitespace in Python, and wish other languages used it instead of brackets or whatever. There, I said it!
- mixmastamyk 5y agoLove it, was a masterstroke. Less is more. Needs trivial editor support, however. If you’re having trouble I suggest showing leading whitespace in the editor with a very low contrast grey highlight color. Ended all issues for me a decade or two ago. Indentation guides help any language as well. Simple editors like Geany can handle it well. Unfortunately, Python has gone backwards with the adding of colons everywhere. Pseudocode aspect has sadly been lost imho.
- kwertyoowiyop 5y agoAgreed. I’m getting more annoyed by seemingly-unnecessary characters these days. Are the colons after if/for/etc really needed for parsing? Could they be made optional, as JS has done for semicolons?
- mixmastamyk 5y agoThose were always there and I think read well due to following prose conventions. Was thinking about typing syntax and walrus.
- kbelder 5y agoI like it, I just wish they had specifically disallowed tabs. Nothing against them, but allowing a mix of tabs and spaces was a horrible idea. They should have settled on one.
- kwertyoowiyop 5y agoI consider dealing with that as my karmic punishment for copy/pasting code off the internet!