Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
In JavaScript it is. But last time I checked (5 years ago) the code with semicolon is quicker.
-
It is optional, but I will always leave an angry comment and deny your PR if you don't use it.
-
inaba45895y@Codex404 by only a couple of cycles. And even then, when ```npm run build``` is run you get it all minified which is one of those like two cases where you have to have semicolons
in fact here's a fun little chart
https://jsperf.com/asi-performance/... -
it optional but prettier forces to remove by default, tbh i never questioned why :D
-
@dUcKtYpEd And I will force an eslint pre-commit hook onto you to stop you from fucking up the minifier because you are unable to press one key per line more that literally requires no thinking.
-
bartmr2795yI don't put semicolons. Discussions like this are for pitiful developers who focus more on whining than to actually do proper work for people. Just do your job, and make code easy to change. that's it.
I like how some here feel superior by denying PRs just to bitch about semicolons. Seems like it's the only thing in life they control. -
Here's a fun chat about it between Douglas Crockford (js core dev) and Jacob Thornton (bootstrap author) having a fun chat about it.
Douglas is against no semis, while Jacob is in favor. -
@dUcKtYpEd Enforcing consistent code and linting is something entirely different.
-
@dUcKtYpEd there is a difference between being an fucking ass and writing clean consistent code. If you don't want to adhere to the rules made you are an ass. Im 100% @PrivateGER will not be an ass about missing semicolons in PRs of a project which is currently not using semicolons.
He might make a discussion with the team as to why he thinks semicolons are preferred.
Personally (like many other JavaScript devs) have never worked without semicolons in my ten years of me writing JavaScript in collaboration with others.
My boss sometimes forgets to adhere to his own conventions am I then being an ass to correct him on it or is he by just failing to follow the conventions he had written up? -
inaba45895y@Codex404 > My boss sometimes forgets to adhere to his own conventions am I then being an ass to correct him on it or is he by just failing to follow the conventions he had written up?
I do that as well if I'm working without eslint and autofixing -
@inaba there is ESlint. And I understand it happens sometimes but I will tell you to fix it.
-
inaba45895y@Codex404 i don't really see a reason as to why you would waste your time doing eslints' job. But if that's what gets you off then 🤷 good for you I guess
-
@inaba he configured ESlint but he just ignores the errors (or doesn't see them) I don't tell him on a daily basis. Maybe once a month.
Related Rants
In Vue js semicolon is optional?
question
js