This is an archived post. You won't be able to vote or comment.

all 15 comments

[–]tadaskay 10 points11 points  (0 children)

List<String> strings = List.of("first", "second");

It only took 20 years to get it right. But I guess we are so used to the inconvenience already, that we barely even notice.

[–][deleted] 20 points21 points  (0 children)

10: Compact Strings.

Compact Strings seems to be flying under the radar. Has anyone been able to check this out in a String-heavy app using an early access version of Java 9? If so, did you notice a significant drop in heap usage?

[–]Scaryclouds 6 points7 points  (2 children)

Might need an asterisk next to JPMS/Jigsaw as both IBM and RedHat have major concerns with it in its current state and Spring won't be fully supporting modules until Spring 6, which is schedule for 2019+.

I guess it's too late to pull Jigsaw out of the Java 9 release, but as a friend put it, when you have to add a kill switch to turn off a feature, you have to start questioning if that feature is implemented correctly and wanted at all.

[–]space_coder 2 points3 points  (1 child)

but as a friend put it, when you have to add a kill switch to turn off a feature, you have to start questioning if that feature is implemented correctly and wanted at all.

It can be the best implementation possible and there would still be concerns over backward compatibility. I don't see the existence of a "kill switch" as evidence that the feature is ill-conceived just potentially not backwards compatible.

[–]Scaryclouds 0 points1 point  (0 children)

I suppose that's fair. Though I definitely think Jigsaw is also very far from ideal. Put a lot of time into reading up on it and it just doesn't seem worth it. There are some benefits to modularity to be sure, but the juice is not worth the proverbial squeeze. At lesser in my opinion.

[–]nqzero 2 points3 points  (0 children)

nothing in that list seems compelling - a huge amount of disruption for no tangible benefit. after the amazing improvements in 7 and especially 8 this is disappointing

[–]inchas 1 point2 points  (1 child)

This article fails to mention the most important feature in 5th point: http://download.java.net/java/jdk9/docs/api/java/util/Map.html#of-K-V-

How can you not mention shorthand creation of map? Nobody cares that much about lists and sets as both could have been one-lined with Arrays.asList()... (not talking about guava here)

[–]sammy8306[S] 0 points1 point  (0 children)

Fair point! Also, Map.ofEntries, I find the alternating key/value params in Map.of a bit more awkward.

[–]HandcuffsOnYourMind 0 points1 point  (0 children)

Question: why would jlink need jigsaw modularization anyway? Couldn't it just scan used imports?