4 ms·
> The so-called benefits always boil down to "this suits my preferences" The of significant white-space are: 1. Reduction of visual noise and improved readabi
by andybak 12y ago
> The so-called benefits always boil down to "this suits my preferences"
The of significant white-space are:
1. Reduction of visual noise and improved readability. I find this uncontroversial. Your eye parses code by indentation, not by curly-braces. I could remove the curlies from javasscript and if the indentation was correct, you'd be able to follow it.
2. Reduction of cognitive load. Instead of giving me two jobs to do: indent correctly and match braces - Python only gives me one of those jobs.
These are real benefits that I experience whenever I work with Python. There are also genuine costs* but I find the balance to be very much in favour of significant whitespace
.
* restrictions on possible choices of syntax being the only one I think actually affects me in anything other than a theoretical sense.
- Ygg2 12y agoEh, most languages and tools nowadays reduce the risk of indenting incorrectly or not matching braces to near zero, so in practice there is little cognitive load either way. Only serious cognitive load for me writing code is whether to add new line at 80 or less chars. That's about it.