4 ms·
As someone who hated the whitespace in python and hates it even more in yaml, please don't. The only significance whitespace should have is its presence or abs
by e3bc54b2 5y ago
As someone who hated the whitespace in python and hates it even more in yaml, please don't.
The only significance whitespace should have is its presence or absence, beyong that, its a pain for human readability.
- scotty79 5y agoAs someone who loves whitespace in python and for whom coffeescript is as close to perfection as as typeless JS can be, I can't oblige. For me brackets should mostly serve a decorative function and rarely ever be nested or span multiple lines or screens. In the spirit of compromise I'd like to see text ediors where bracekts or no brackets is just a visual toggle you can switch back and forth on a whim.
- jampekka 5y agoWhy do you hate it? General claims about "human readability" is quite suspect, or then it implies I'm not a human?
- e3bc54b2 5y agoFair enough, I should explain. When I'm reading or writing code for Java,or C I am reading or writing code. My brain parses all the visible characters and safely ignores the invisible whitespace. Indentation is just better readability. When I'm reading or writing Python/Yaml, suddenly I'm having to pay attention to what is not visible to my eye as well. Its extra cognitive load and that reduces readability.
- jampekka 5y agoSorry for the late response, but I find this interesting. I've encountered similar reports earlier regarding this question. There may be quite fundamental differences in how people "see" code. I don't pay any attention to the block delimiters, and am easily fooled if the indentation doesn't match the block structure. Do you ever make the infamous semicolon-after-if-clause bug in C? I do sometimes and it can take ages just to see that semicolon.