Live data from Hacker News

What's new in Java 12, 13 and 14

java.christmas

131–136 of 136 posts

Re: What's new in Java 12, 13 and 14

#131
post #20
post #5

Pattern matching in switch statements (calling them match statements would then be more fitting), a nice way to deal with nulls, and proper sum types (aka tagged unions, like enums in Rust) and Java would be pretty up-to-date.

Oooh that's a good idea. Does that already exist in other languages? I've not seen it before.

Swift also have them.

Re: What's new in Java 12, 13 and 14

#132

I really wish they would use a numbering scheme that used points for the non-LTS releases: 8.0, 8.1, 8.2, 9.0...

I’m wondering when Java 2 comes. Java 12 is actually 1.12...

They dropped the pretend Java 7 => Java 1.7 thing already. They don't even do 7u80 style versions anymore.

Re: What's new in Java 12, 13 and 14

#133

I really wish they would use a numbering scheme that used points for the non-LTS releases: 8.0, 8.1, 8.2, 9.0...

I’m wondering when Java 2 comes. Java 12 is actually 1.12...

> Java 12 is actually 1.12...

No it is not.

Re: What's new in Java 12, 13 and 14

#134
post #106

Earlier quoted context omitted.

> Other future changes I am excited for, but don't expect to get implemented any time soon, if ever, frankly, are: Most if not all of them will land in the next few years. In fact, working on those precise features is what most of the OpenJDK team does. > Improved native code interop. I consider this to be both a language and VM change. That would be Project Panama, making its initial, partial delivery in JDK 14 (GA…

Utterly dumb question but why is tail recursion necessary in the JVM given that the compiler is better placed simply to turn recursion into a loop. TR removal should be done best at the highest level I'd think.

> the compiler is better placed simply to turn recursion into a loop

How do you think it should do this? While keeping the semantics of Java.

Re: What's new in Java 12, 13 and 14

#135

Earlier quoted context omitted.

I’m wondering when Java 2 comes. Java 12 is actually 1.12...

They dropped the pretend Java 7 => Java 1.7 thing already. They don't even do 7u80 style versions anymore.

Really? When?

EDIT: It went Java 1.4 -> 5.0[0]

[0]: https://en.wikipedia.org/wiki/Java_version_history

Re: What's new in Java 12, 13 and 14

#136
post #25

Earlier quoted context omitted.

Java 8 was released March 18, 2014, so they had 5 years to upgrade. But I see your point about the new release schedule, where the LTS version is not supported after 6 months. I think the companies need to change their mindsets. New Java version are backwards compatible, as they introduce changes gradually. It is actually more dangerous to wait, because they risk that some features (like GC) are deprecated after 4-5…

I still need to pass weird flags for Tomcat to make it work under Java 9+, almost 6 years later. Modules were a mistake. If not for modules, a lot of people would have migrated to 9+.

Modules were certainly the biggest upgrade barrier ever in the history of java. But the have enabled a way for the JDK to get smaller without them we would face the JDK getting bigger with each release, which is not sustainable.

So on reflection I think it was a good move. Most frameworks and libraries work on modules now.

Post reply on HN