syntactic sugar

noun

syntactic sugar

noun

Etymology Attributed to British computer scientist Peter Landin.

1

Computing, Engineering, Mathematics, Natural sciences, Physical sciences, Programming, Sciences Additions to the syntax of a programming language that make code easier for humans to read or write, but that do not change the functionality or expressiveness of the language.

  • In fact, this is how lists are actually built, by consing all elements to the empty list, []. The commas-and-brackets notation is just syntactic sugar, a more pleasant way to write code. So [1, 2, 3, 4, 5] is exactly equivalent to 1:2:3:4:5:[]. ᵂᴮ
Derived terms
desugar, desugared, syntactic saccharin, syntactic salt, syntactic syrup
Related terms
pretty-print

Entry derived from the Wiktionary, under licence CC BY-SA 4.0 — list of authors.