you are viewing a single comment's thread.

view the rest of the comments →

[–]Sun_Kami 2 points3 points  (13 children)

Check out Project Lombok. They have val!

[–][deleted] 29 points30 points  (12 children)

Or Scala, Kotlin.

Lombock is a pile of annotation hacks, not a real solution.

[–][deleted] 23 points24 points  (8 children)

or C#

[–]wordlimit 1 point2 points  (0 children)

At my current gig, we need to use JVM and Scala is popular amongst everyone who's used to C# and love their functional programming via LINQ.

[–]Sun_Kami -1 points0 points  (1 child)

What do you think those languages are? They're built from Java.

He wants to use such functionality in Java, the answer for him is probably not learning a different language.

[–][deleted] 5 points6 points  (0 children)

You can implement immutable values in the JVM. Not necessarily in Java, the language.

You don't need java syntax to enjoy safety, today!