Syntactic sugar

Term coined by Peter Landin for additions to the syntax of a language which do not affect its expressiveness but make it “sweeter” for humans to use. Syntactic sugar gives the programmer an alternative way of coding that is more succinct or more like some familiar notation. It does not affect the expressiveness of the formalism (compare chrome).
Syntactic sugar can be easily translated (“desugared”) to produce a program in some simpler “core” syntax. E.g. C’s “a[i]” notation is syntactic sugar for “*(a + i)”. In a (curried) functional language, all operators are really functions and the use of infix notation “x+y” is syntactic sugar for function application “(+) x y”.
Alan Perlis once quipped, “Syntactic sugar causes cancer of the semicolon.”
The variants “syntactic saccharin” and “syntactic syrup” are also recorded. These denote something even more gratuitous, in that they serve no purpose at all. Compare candygrammar, syntactic salt.


Read Also:

  • Syntagm

    noun, plural syntagmas, syntagmata [sin-tag-muh-tuh] /sɪnˈtæg mə tə/ (Show IPA). Linguistics. 1. an element that enters into a syntagmatic relationship. noun (pl) -tagmata (-ˈtæɡmətə), -tagms 1. a syntactic unit or a word or phrase forming a syntactic unit 2. a systematic collection of statements or propositions

  • Syntagmatic

    adjective, Linguistics. 1. pertaining to a relationship among linguistic elements that occur sequentially in the chain of speech or writing, as the relationship between the sun and is shining or the and sun in the sentence The sun is shining. adjective 1. of or denoting a syntagma 2. (linguistics) Also synˈtagmic (sɪnˈtæɡmɪk). denoting or concerning […]

  • Syntality

    noun 1. behavioral characteristics of a group perceived as parallel to or inferable from the personality structure of an individual.

  • Syntax

    noun 1. Linguistics. the study of the rules for the formation of grammatical sentences in a language. the study of the patterns of formation of sentences and phrases from words. the rules or patterns so studied: English syntax. a presentation of these: a syntax of English. an instance of these: the syntax of a sentence. […]

Disclaimer: Syntactic sugar definition / meaning should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional. All content on this website is for informational purposes only.