I want more syntactic sugar in my Java!

"Syntactic sugar causes cancer of the semicolon."

-- Alan Perlis. Epigrams on Programming.


Sounds like you want Groovy... Apparently properties are on their way, although not in Java 7 (as @erickson helpfully corrected me about in a comment).

Groovy does have nice string sugar.


While I don't necessarily agree with Java's philosophy, I think that adding lots of syntactic sugar to Java would go against its philosophy. Java is supposed to be a very simple, easy to reason about language with few constructs, kind of a lowest common denominator lingua franca in the programming community. It was largely a reaction to the complexity of C++. There is supposed to be very little "magic" in it, beyond what is needed (garbage collection, mostly) to make it a memory-safe language.

If you want more sugar, etc. in a reasonably high-performance, statically typed language, I would say that Java is just the wrong language for you. You're probably better off just using C#, or maybe D.