Live data from Hacker News

What's new in Java 12, 13 and 14

java.christmas

21–30 of 136 posts

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

#21
post #9

One thing I find a bit disappointing is the focus on language features. Most of the effort in Java goes into the VM and libraries, while keeping the language conservative. This is because VM/library features have a much bigger impact on application quality, and more directly impact the application's users; moreover, it's a strategy that's proven quite successful -- HN notwithstanding, most developers don't like too m…

I agree. I find the VM stuff the most facinating too, but I think you're underestimating the incredible impact language changes have had and continue to. Language changes don't aren't just bells and whistles. Lambdas changed how nearly every API works and record types have the opportunity to make a huge difference. Sure var was smaller, but it's been refreshing. I also think you're underselling how conservative the o…

6 months is not hectic, because the new feature releases are not major releases. In fact, major releases are gone, the last one ever being 9.

Up until JDK 9, there used to be patch releases every couple of months, and big feature releases (which used to be called "limited updates") every six months. In addition to bug and security fixes, those included large, potentially disruptive features — like JavaFX and support for Linux on Arm in 7u6, Java Flight Recorder and Mission Control in 7u40, AppCDS in 8u40, and even support for Mac OS and a new GC algorithm in 7u4. Those releases also stopped getting patches after six months, when the new one was released, i.e. there were no more patches for 8u20 once 8u40 came out. Now, despite having major, disruptive features, those "limited update" releases were not allowed to change the Java SE spec, so they couldn't change the language or the library API. There were serious problems with the old model, so Oracle decided to do away with major releases altogether. To do that, they relaxed the limitation on spec changes in the six-monthly feature releases, and also changed their name. Instead of 8u40, 8u60 etc., they now get a new integer number. If you don't want to use new API and language features (you can even turn them off with the --release flag), those releases are almost the same as they used to be. If their six-month cadence between 8u40 and 8u60 was good enough for you back then, there's no reason it shouldn't be now.

(I work on OpenJDK at Oracle, but speak only for myself)

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

#22
As someone that used to write a lot of C#, I find that the language is changing so often that it's hard to know what's new and what's been around for years.

In contrast, Java hasn't changed all that much over the years, and I wonder if an approach of taking the more useful features from C# and ignoring some of the others would be a good approach.

I often wonder how Java developers feel when they look over at C#, and see a language that has exploded in functionality over the last decade, all while Java has mainly optimised the JVM and slowly added features.

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

#23
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.

Ocaml, F#, Rust, Kotlin (I believe), Haskell, etc

It is a common feature in languages derives from the ML family[0].

[0]: https://en.wikipedia.org/wiki/ML_(programming_language)

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

#24
I'm more looking forward to things like Project Panama.

A big gap between Java and C# is value types and better interop with native code ("pointers"). ByteBuffers in Java are painful for many usages and very poor compared to things like [StructLayout(LayoutKind.Sequential)] in C#.

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

#25
post #13

Earlier quoted context omitted.

Java moved to a six-months release cycle in 2017: https://en.wikipedia.org/wiki/Java_version_history Java 8 had its end-of-life for commercial usage in january 2019. The new long term release is Java 11. Time to move on for you.

Some companies spend longer than six months to discuss/agree to a 'major version upgrade' of software. Naturally the gap between (say) Java 10 and 11 is fairly small, meaning it shouldn't take many months to merely discuss an upgrade - but not all companies have got round to the regular-release way of thinking.

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 versions. By updating regularly and keeping an eye on deprecated features, they should have time to adjust

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

#26
post #13

Earlier quoted context omitted.

Java moved to a six-months release cycle in 2017: https://en.wikipedia.org/wiki/Java_version_history Java 8 had its end-of-life for commercial usage in january 2019. The new long term release is Java 11. Time to move on for you.

Some companies spend longer than six months to discuss/agree to a 'major version upgrade' of software. Naturally the gap between (say) Java 10 and 11 is fairly small, meaning it shouldn't take many months to merely discuss an upgrade - but not all companies have got round to the regular-release way of thinking.

It doesn't matter so much, as Java is backwards-compatible to stone age. If the company has finally settled on a backlog, they can start with whatever LTS version is the most recent one.

It's only a drawback for hired hands that may have become used to the features in v13 and then land a gig where they have to scale back to v1.6, that has to hurt.

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

#27
post #13

Why are they spewing Java versions so quickly? I have barely moved to 8 yet.

Java moved to a six-months release cycle in 2017: https://en.wikipedia.org/wiki/Java_version_history Java 8 had its end-of-life for commercial usage in january 2019. The new long term release is Java 11. Time to move on for you.

>Java 8 had its end-of-life for commercial usage in january 2019

_Oracle's_ Java 8 end-of-lifed, but many other vendors provide TLS for their respective Java implementations.

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

#28
post #13

Earlier quoted context omitted.

Java moved to a six-months release cycle in 2017: https://en.wikipedia.org/wiki/Java_version_history Java 8 had its end-of-life for commercial usage in january 2019. The new long term release is Java 11. Time to move on for you.

Some companies spend longer than six months to discuss/agree to a 'major version upgrade' of software. Naturally the gap between (say) Java 10 and 11 is fairly small, meaning it shouldn't take many months to merely discuss an upgrade - but not all companies have got round to the regular-release way of thinking.

It's not really an "update every 6 months" thing - I imagine most companies will stick to the LTS releases which are less frequent.

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

#30
post #25

Earlier quoted context omitted.

Some companies spend longer than six months to discuss/agree to a 'major version upgrade' of software. Naturally the gap between (say) Java 10 and 11 is fairly small, meaning it shouldn't take many months to merely discuss an upgrade - but not all companies have got round to the regular-release way of thinking.

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…

The LTS versions are supported past 6 months. Java 11 has 2 years of public updates through AdoptOpenJDK. The next LTS (17) will no doubt have similar.
Post reply on HN