7 ms·
> I wouldn't say that, but it is a decision based on vanity and it does tend to come from younger/junior coders in my experience You're not wrong, but using it
by ng12 8y ago
> I wouldn't say that, but it is a decision based on vanity and it does tend to come from younger/junior coders in my experience
You're not wrong, but using it as an argument has a counter: people like semis because they're the old-guard curmudgeons afraid of change :)
> then you risk running into a bug like the one that broke Twitter Bootstrap due to lack of semis.
The bug was due to a JS minifier removing a needed semi, which they did to save space. I still don't know of an example of somebody actually shipping code that broke due to a missing semi in source.
> It's also not a minor semantic. The language requires them and if you make the error of omitting them
That's not true at all. ASI is intentionally a part of the language spec, hence why there's not a single runtime that allows you to turn it off.
> The people who wrote these guides really cared about semicolons, that's why they put it in the rules.
The people who wrote those guides were writing them for hundreds of developers with varying levels of experience and a wide variance in tech stacks. I probably would have put it in the spec too, but that doesn't mean I don't set `semi: false` in every React project I start.
- wayneftw 8y ago> You're not wrong, but using it as an argument has a counter... I'm not using it as an argument. I'm using it as a descriptor for people who make arguments against semis. > ASI is intentionally a part of the language spec... Yes, but it's clearly there as a corrective measure for people who mistakenly omit them. So, the spirit of the language spec and all signs point to: use them. > I probably would have put it in the spec too, but that doesn't mean I don't set `semi: false` in every React project I start. To write a spec rule and then immediately ignore it makes no sense to me. But anyway...why do you not want semis? If you have a tool that automatically inserts them, like prettier or eslint, then the only reason you're making that decision is because you don't like the way they look. That's pretty shallow reasoning IMO.
- deleted 8y ago[deleted]
- ng12 8y ago> I'm using it as a descriptor for people who make arguments against semis. Doesn't change the point: "back in my day, we used semicolons everywhere..." > Yes, but it's clearly there as a corrective measure for people who mistakenly omit them. So, the spirit of the language spec and all signs point to: use them. I think you're projecting quite a bit here. If you're interested, here's a ticket from TC39 proposing directly discussing possible issues with ASI: https://github.com/tc39/ecma262/pull/1062/files https://github.com/tc39/ecma262/pull/1062/files Point being they're not advocating for using semicolons, but making it clear what the possible edge cases are. > But anyway...why do you not want semis? Because I don't want the noise. Yeah, theoretically they might save you some time debugging once in a few million LoC but including them everywhere adds a whole lot of pointless characters.