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

re: I'm a huge fan of syntactic sugar in C# - but its always there. In JavaScript, support is dependent on the environment unless you transpile and pol...

Well I guess coffeescript is complete syntax caramel then!

That is a really clear example, thanks!


lol "complete syntax caramel"... I love it! I'm using that!

I've also used the term "syntactic saccharine" to describe bad sugar. Causes cancer of the semicolon.

I like how CoffeeScript turns this

x?.y?.z = 3

into this

if (typeof x !== "undefined" && x !== null) {
  if ((ref = x.y) != null) {
    ref.z = 3;

Short, sweet, and succinct. Now that is a delicious syntactic caramel!

Those are great. Included with C# 6, probably copied from coffeescript.

code of conduct - report abuse