What is syntactic sugar in programming languages

Syntactic sugar

Syntactic sugar are syntax extensions in programming languages, which serve to simplify notations.[1] These extensions are alternative notations, but they do not extend the expressiveness and functionality of the programming language.[2]

Syntactic sugar can be traced back to basic elements of language through pure text transformations (“desugar”, dt. To sweeten).[2]

The term syntactic sugar was founded in the 1960s by the British computer scientist Peter J. Landin[3][2] embossed.

Examples

Syntactic salt

The opposite of syntactic sugar is that syntactic salt - a language property that makes it difficult to write bad or hard-to-read codes without extending the functionality.[5]

Individual evidence

  1. RWTH Aachen: syntactic sugar. Retrieved October 9, 2018.
  2. abcType-sound Syntactic Language Extension. (PDF) Retrieved October 9, 2018 (English).
  3. ↑ Edsger W. Dijkstra points in his Trip report@ 1 @ 2 Template: Dead Link / userweb.cs.utexas.edu (Page no longer available, search inWeb archives) indicate that the term can be traced back to Peter Landin, and the term is already used in the 1965 report of the Department of Computer Science at the University of Illinois.
  4. Syntactic sugar in C: arrays. November 28, 2013. Retrieved October 9, 2018.
  5. RWTH Aachen: syntactic salt. Retrieved October 9, 2018.