Syntactic sugar is a feature in a programming language that provides no new functionality that can't be gotten from using other features, but that makes writing (and sometimes reading) code easier. For example, in C, any reasonable compiler will produce identical machine code for each of these three lines:

   1 x++;
   2 x += 1;
   3 x = x + 1;


CategoryProgrammingNotes

SyntacticSugar (last edited 2011-12-22 06:10:53 by JamesAspnes)