3 ms·
Many of the complaints are due to the opinion that the braceless if is bad: if(foo) bar(); I understand why you may think if(foo) { bar(); } is bett
by nonchalance 13y ago
Many of the complaints are due to the opinion that the braceless if is bad:
if(foo) bar();
I understand why you may think
if(foo) { bar(); }
is better, but it's unnatural for most people
- brynary 13y agoYeah we don't have a strong opinion on the matter. The lack of braces can lead to bugs when attempting to expanding the code in the conditional, as has been the case since the C days IIRC. The linting is configurable to projects preferences, by checking in a .jshintrc file.
- MartinCron 13y agoSpeak for yourself, I find the absence of braces to be very unnatural.