Skip to main content

Syntactic Sugar

/sin-tak-tik shu-gər/

[coined by Peter Landin]

n. Features added to a language or other formalism to make it 'sweeter' for humans, that do not affect the expressiveness of the formalism (compare chrome). Used esp. when there is an obvious and trivial translation of the 'sugar' feature into other constructs already present in the notation. C's 'a[i]' notation is syntactic sugar for '*(a + i)'. "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

The variant 'syntactic saccharine' is also recorded. This denotes something even more gratuitous, in that syntactic sugar serves a purpose (making something more acceptable to humans) but syntactic saccharine serves no purpose at all.