Syntax Sugar
Noun · Development · Origin: 1964
Definitions
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
- Hardcoded
- Automagically
- Deep Magic
- Magic Number
- Scope
- Division
- DSL
- Figure
- Framework
- Function
- Function Handle
- Higher-Order Function
- HPC
- Implicit
- Interface
- Library
- No Hidden Control Flow
- Type System
- Vapi
- Command Line Interface
- Custom Hook
- Deploy Hook
- Fluent Interface
- Hook
- Interface Segregation
- Runtime
- SvelteKit
- Turbo
- Type Safety