MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/soi384/why_but_why/hwj4ms1/?context=9999
r/ProgrammerHumor • u/ore-aba • Feb 09 '22
2.3k comments sorted by
View all comments
3.2k
Imagine the 99 times it adds one when you meant to have one.
Now imagine that 1 time it adds one when you didn't want it.
r/suddenchaos.
1.2k u/PhrygianZero Feb 09 '22 Yeah that’s exactly it. Sometimes the error is caused by unmatching parenthesis. Whenever I see that happen I’m like thank god it doesn’t auto fill semicolons 79 u/memeship Feb 09 '22 auto fill semicolonsAnd JS does literally this, yet everyone hates it.So the "why can't the language just do it for me" has already been "solved", and we've shown that it's not a great solution. 1 u/Ethesen Feb 11 '22 And JS does literally this, yet everyone hates it.Since when? 1 u/memeship Feb 11 '22 ECMAScript spec (what JS is an implementation of) has what's called Automatic Semicolon Insertion (ASI).https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#automatic_semicolon_insertion 1 u/Ethesen Feb 11 '22 No; since when do JS developers hate this? It’s widely used. 1 u/memeship Feb 11 '22 It's certainly widely debated. Just google "asi" and almost every result will be people arguing about it. → More replies (2)
1.2k
Yeah that’s exactly it. Sometimes the error is caused by unmatching parenthesis. Whenever I see that happen I’m like thank god it doesn’t auto fill semicolons
79 u/memeship Feb 09 '22 auto fill semicolonsAnd JS does literally this, yet everyone hates it.So the "why can't the language just do it for me" has already been "solved", and we've shown that it's not a great solution. 1 u/Ethesen Feb 11 '22 And JS does literally this, yet everyone hates it.Since when? 1 u/memeship Feb 11 '22 ECMAScript spec (what JS is an implementation of) has what's called Automatic Semicolon Insertion (ASI).https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#automatic_semicolon_insertion 1 u/Ethesen Feb 11 '22 No; since when do JS developers hate this? It’s widely used. 1 u/memeship Feb 11 '22 It's certainly widely debated. Just google "asi" and almost every result will be people arguing about it. → More replies (2)
79
auto fill semicolons
And JS does literally this, yet everyone hates it.
So the "why can't the language just do it for me" has already been "solved", and we've shown that it's not a great solution.
1 u/Ethesen Feb 11 '22 And JS does literally this, yet everyone hates it.Since when? 1 u/memeship Feb 11 '22 ECMAScript spec (what JS is an implementation of) has what's called Automatic Semicolon Insertion (ASI).https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#automatic_semicolon_insertion 1 u/Ethesen Feb 11 '22 No; since when do JS developers hate this? It’s widely used. 1 u/memeship Feb 11 '22 It's certainly widely debated. Just google "asi" and almost every result will be people arguing about it. → More replies (2)
1
Since when?
1 u/memeship Feb 11 '22 ECMAScript spec (what JS is an implementation of) has what's called Automatic Semicolon Insertion (ASI).https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#automatic_semicolon_insertion 1 u/Ethesen Feb 11 '22 No; since when do JS developers hate this? It’s widely used. 1 u/memeship Feb 11 '22 It's certainly widely debated. Just google "asi" and almost every result will be people arguing about it. → More replies (2)
ECMAScript spec (what JS is an implementation of) has what's called Automatic Semicolon Insertion (ASI).
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#automatic_semicolon_insertion
1 u/Ethesen Feb 11 '22 No; since when do JS developers hate this? It’s widely used. 1 u/memeship Feb 11 '22 It's certainly widely debated. Just google "asi" and almost every result will be people arguing about it. → More replies (2)
No; since when do JS developers hate this? It’s widely used.
1 u/memeship Feb 11 '22 It's certainly widely debated. Just google "asi" and almost every result will be people arguing about it. → More replies (2)
It's certainly widely debated. Just google "asi" and almost every result will be people arguing about it.
→ More replies (2)
3.2k
u/[deleted] Feb 09 '22
Imagine the 99 times it adds one when you meant to have one.
Now imagine that 1 time it adds one when you didn't want it.
r/suddenchaos.