"Syntactic sugar": After self-studying what seems like a narrow and ever-changing field for four years this term keeps rearing its head. I'm not usually one to squabble over the semantic aspects of any language... but this noun has sent me into a confusing tailspin before.
The first time I heard of the term "syntactic sugar" was in relationship to React. I heard about it in terms of
JSX in a Wes Bos React video. Then it was described as such in terms of
await. Hell, there are even talks on this!
(Without Googling) What I interpret it to mean between seasoned developers, is that syntactic sugar is an aspect of a language or framework that allows devs to write code in an abbreviated, clear and/or easier way.
Couldn't it be argued that anything that abbreviates or makes writing code simpler and cleaner "syntactic sugar"? Wouldn't template literals, destructuring or even
+= then be syntactic sugar?
Despite the analogy, the term "syntactic sugar" did not/is not helping me, or learners understand what the very sweet, refined characteristic of a language or framework does!
Every time I hear it, I'm just going to omit and continue reading the examples.
Ok. I'm open to hearing how this term is canonical and useful. It's likely I'm just "young" on my second career and disgruntled.
So I did have to google if anyone on the internet shared my opinion, and this post seems to place my sentiments more eloquently.