u/CaptainStackin r/programming • Recommends
On “Imperative vs Declarative Programming”
MPJ of the YouTube channel FunFunFunction (link to this video discusses this in a video called semicolons cannot save you (link to this video
I think it's a good discussion, though based on his own points I actually draw the opposite conclusion (still strongly recommend his channel for great weekly programming discussions). I think it makes code both safer and more readable and kind of wish they enforced at the language level in JavaScript. Here's a quick breakdown of the points if you don't feel like watching:
JavaScript features automatic semicolon insertion (ASI), a feature that's commonly considered unhelpful and can cause problems in certain cases. For instance:
function randomNumberA() {…