Syntax Sugar

Noun · Development · Origin: 1964

Definitions

  1. Syntactic features in a programming language that make code easier to read or write but don't add new capabilities — they're just a sweeter way to express something the language can already do.

    In plain English: Shortcuts in a programming language that make code easier to read and write, even though you could accomplish the same thing the longer way.

Etymology

1964
Peter Landin coins 'syntactic sugar' in his paper 'The Mechanical Evaluation of Expressions,' describing syntax that doesn't add functionality but makes code sweeter to write
1990s
Object-oriented languages introduce operator overloading, foreach loops, and other sugar that becomes so standard developers forget it's sugar
2015
ES6 adds arrow functions, destructuring, and template literals to JavaScript — the most impactful batch of syntactic sugar in web history

Related Terms