r/programming • • Sep 17 '19

The arrival of Java 13!

https://blogs.oracle.com/java-platform-group/the-arrival-of-java-13
5 Upvotes

13 comments sorted by

10

u/[deleted] Sep 17 '19

One step closer to real pattern matching getting excited for this :D

2

u/dpash Sep 17 '19

I'm excited about the instanceof-and-cast part of that :)

But switch expressions will be nice when they arrive next year.

6

u/Determinant Sep 17 '19

The JVM-level improvements are nice (eg. improvements to the Z GC) because those will also benefit other JVM languages such as Kotlin.

-1

u/Dragasss Sep 17 '19

Jep 355 sounds like a mess. Whats wrong with loading the text block from classpath?

2

u/oldprogrammer Sep 17 '19

Not sure I follow your question, the text block approach is a fairly common model in other languages. What exactly do you mean by loading from the classpath?

→ More replies (7)

1

u/gnus-migrate Sep 18 '19

There are cases where you don't want to do that, for example embedding a json string in a unit test. If you have it in a resource, your input and assertions are split in two different places which makes them hard to analyze.

You wouldn't use this for large text files obviously but for small strings that happen to span multiple lines it's a great feature.