4 ms·
I never have to "look at the next line and reason about it" -- you simply do not find yourself in a position very often of starting a line with an open brace. I
by encoderer 11y ago
I never have to "look at the next line and reason about it" -- you simply do not find yourself in a position very often of starting a line with an open brace. I'm not going to list all of the little reasons why I found it more enjoyable and easier to omit the semicolons. If you're interested, try it on a project yourself. Suffice to say, I found several cases where my life was just easier. Here's just one, from the very top of a file. It's easier to add another import to this list:
let states = require('../data/states.json')
, cloneDeep = require('lodash/cloneDeep')
- acdha 11y agoAgain, I have tried this and fail to see any more benefit than, say, changing the indent size in my editor. Personally, I prefer let states = require('../data/states.json'), cloneDeep = require('lodash/cloneDeep'); to let states = require('../data/states.json') , cloneDeep = require('lodash/cloneDeep') but that's an unimportant aesthetic preference. The structure of the code is the same and my experience working with it is fundamentally unchanged. In either case we're talking about a fraction of a percentage of the time it takes to understand what the application is or should be doing. Now compare that to something which actually matters: arrow functions, classes, modules and imports, the newer data structures, generators, etc. In that case, the time spent adopting a new style actually changes the structure of the code you're writing and, hopefully, makes it easier to clearly convey your intention to the next person who works on it.
- encoderer 11y agoYou have strong opinions about this. That's cool, and if you believe one way is more correct that's also cool. My advice to everybody is the same advice I gave you: try it. Try project without them and see. The only risk is that you might find out you're wrong. If you want to add them later there are tools for that.
- acdha 11y ago> You have strong opinions about this. It's odd that you appear to have ready my comments but missed the point where I repeatedly said that I do not have a strong opinion about this and was expressing my surprise that some people do.