syntactic sugar
短语语法糖
发音
US
US
释义与例句
n.
-
1.
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:[]. ᵂᴮ
词源
Attributed to British computer scientist Peter Landin.
来源:wiktionary