It means a "syntax shortcut" sort of. An alternative syntax to write something that is faster / cleaner. Like in JavaScript default arguments function foo(a=1) {...} are basically syntactic sugar over the old way of manually checking if each argument was given and setting the proper value: function foo(a) { if (a === undefined) a = 1; ... }
7
u/Nicd Feb 06 '18
It means a "syntax shortcut" sort of. An alternative syntax to write something that is faster / cleaner. Like in JavaScript default arguments
function foo(a=1) {...}are basically syntactic sugar over the old way of manually checking if each argument was given and setting the proper value:function foo(a) { if (a === undefined) a = 1; ... }