2 ms·
I think that's an unfair comparison: in the first example, you have indentation to tell you what the intent was. With inexperienced programmers like you bring
by necovek 5y ago
I think that's an unfair comparison: in the first example, you have indentation to tell you what the intent was.
With inexperienced programmers like you bring up, if it was mistyped instead:
if(err) {
console.log('something bad happened')
recover()
continue()
I don't believe that compiler syntax error would help one iota (eg. they might just stick } after the continue() to get the compiler to let the code through).
Significant indentation can throw someone for a loop in a very narrow set of copy-paste mistakes (i.e. where pasted code is still indented in a way to pass the syntax checks, since you can't mix and match number of spaces in Python either).
Though having good editor support is crucial for programming.