4 ms·
> But in a language with brackets, the compiler can at least determine scope even when things are poorly-indented. Yes, but can it determine scope if things ar
by psv1 7y ago
> But in a language with brackets, the compiler can at least determine scope even when things are poorly-indented.
Yes, but can it determine scope if things are poorly-bracketed? Because that's the fair comparison.
- smt88 7y agoPoor bracketing almost always causes syntax or compiler errors. As long as you have a language that's block-scoped (which is true of modern JavaScript and most other popular languages), you'll get an error if you make a bracketing mistake. That's not true of indent mistakes. Semantic whitespace is lossy -- there's data contained in those brackets that some people think is low-value that it's expendable for the sake of saving keystrokes, but it does have value in practice.
- fuzz4lyfe 7y agoWith Python, generally speaking, if you are more than a few indentations deep you are doing something wrong. Flat is better than nested
- dreamcompiler 7y agoThat's a good heuristic for a programmer but it's no help to a compiler.