Sh*tpost: can we stop saying "syntactic sugar"?

Jen Chan - Jan 18 '19 - - Dev Community

"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 async and await. Hell, there are even talks on this!

syntactic sugar toy story meme

(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.

For example, writing JSX helps with integrating javascript into HTML in a view while writing partials. Async/await makes Javascript look as if it's synchronous while reminding us it's going to run asynchronously, pause the execution of a function and wait til a promise resolves or information returns.

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 ++ and += 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.

rant.end()

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.

I needed a definition anyway, so here are some resources I found helpful:
Sweet API – Syntactic Sugar And You
Quora | What is Syntactic Sugar?

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player