syntactic sugar : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

syntactic sugar
AKA (Also Known As) sugar. In a computer language, there may be an abbreviation that lets you specify something you can also specify longhand. It will not let you specify anything new you could not do longhand. In Java the ++ and += operators could be considered syntactic sugar. In Java 8, the lambda operators could be considered syntactic sugar for anonymous inner classes. The original devisers of Java, Gosling and Joy were strongly averse to sugar. That has been somewhat relaxed recently. It a contemptuous term for language features that make life convenient for the application programmer, but which generate the same byte code as previously. The JDK (Java Development Kit) 1.5+ autoboxing feature that automatically inserts conversions back and forth between Integer and int would be an example. The for : each loop is another example. Extreme aversion to syntactic sugar is the programming equivalent of Puritanism.

This page is posted
on the web at:

http://mindprod.com/jgloss/syntacticsugar.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\syntacticsugar.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[18.97.14.84]
You are visitor number