|
Or because people simply don't want to have to think about when statements end. I know the semicolon insertion rules, because I'm obsessive-compulsive like that. In any team I lead, any software I write, and any open-source project I maintain, the coding standard will be "Terminate all your statements with semicolons." Why? Because my job is to make less work for people, not more. I could give them a list of 4 rules, often each having a list of a half dozen+ tokens, and say "memorize these, or you're not a professional JavaScript programmer". Or I could say "Terminate your statements with semicolons", and there's one rule, the same as in many other languages, for them to memorize. Other projects are free to do whatever they want with their coding standards, and if they want to make things complicated to show how 1337 they are or just because they think it looks pretty, fine. But of all the things you need to worry about to be a good frontend engineer, where to put the semicolons seems like the stupidest possible one. |