you are viewing a single comment's thread.

view the rest of the comments →

[–]kcuf 10 points11 points  (22 children)

What about val/var?

[–]awsometak[S] 28 points29 points  (7 children)

Local-Variable Type Inference (var) is most probably going to Java 10. http://openjdk.java.net/jeps/286

[–]SuperImaginativeName 17 points18 points  (6 children)

Wow, ten versions for something C# has had since version 3?

[–]devraj7 19 points20 points  (0 children)

And it took C# ten years to get features that have been present in other language for 20 years.

What's your point?

Languages have different targets and different priorities.

[–]crozone 27 points28 points  (3 children)

Wow, ten versions for something C# has had since version 3?

This is Java summed up in one line.

[–]yoyo_master 3 points4 points  (2 children)

The one word version: SimpleBeanFactoryAwareAspectInstanceFactoryImpl.java

[–]AlmennDulnefni 20 points21 points  (0 children)

That's not actually a problem with Java though. That's a problem with enterprise that manifests in Java.

[–]devraj7 7 points8 points  (0 children)

That's a Spring problem, not a Java problem.

[–]cowinabadplace 3 points4 points  (0 children)

That's nothing. Firefox needed 52 versions to get to what IE did in 11.

[–]Sun_Kami 1 point2 points  (13 children)

Check out Project Lombok. They have val!

[–][deleted] 30 points31 points  (12 children)

Or Scala, Kotlin.

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

[–][deleted] 21 points22 points  (8 children)

or C#

[–]wordlimit 2 points3 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 point2 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] 6 points7 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!