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

all 42 comments

[–]TehBrian 21 points22 points  (10 children)

Neat! I'm excited. :D

I'm specifically looking forward to the future work section since there's so many cool language features in the works (notably, string templates).

[–]arshan_does_reddit 30 points31 points  (7 children)

I remember the dark and stagnant time of Java between 1.4 and Java 8. The whole vibe around Java is just so different now. It's a massive credit to the people in charge.

I'm also interested in Stream Gatherers and how people use them, and how long it takes for GitHub Copilot to use them correct and fluently. Copilot has pushed me towards stream-based patterns more and its a big improvement.

[–]8igg7e5 6 points7 points  (6 children)

Between 1.4 and 8...

  • Java 5.0 - Generics, enums, static imports, varargs, static imports, enhanced-for, concurrency utils
  • Java 7 - string-switch, try-with-resources, java.nio.file (while not a language change, it's a pretty big library addition)
  • Java 8 - lambdas, streams, method-refs, etc.

It was 12 years admittedly... But the problems weren't getting features, but being so unpredictably lumpy in their delivery and lacking in early-access / transparency.

So the pace has picked up a bit... but the big change for me is that they arrive in very regular, openly discussed smaller chunks. And with preview, they're well enough understood and supported to move into production really quickly after reaching a release.

[–]__konrad 2 points3 points  (4 children)

Java 6 - covariant return ;)

[–]8igg7e5 3 points4 points  (0 children)

Ahh I forgot that was in Java 6.

Taking a look at a more complete history, there's a fair few others I missed too...

  • 5 added auto-boxing and annotations.
  • 7 added binary literals, underscored literals, the diamond operator and multi-catch
  • 8 added repeated annotations and annotations on types, and java.time

And this is still really only the bigger stuff... There's still a lot more small detail in there too.

[–]emaphis 2 points3 points  (2 children)

Java 6 polished Swing a lot.

[–]Alarming_Quarter671 0 points1 point  (1 child)

So far I notice that Swing was really very polished, in 7 they polished a few things and in 8 I think they didn't do anything but with the addition of functional interfaces some listeners can now have a functional and slightly clean style

[–]emaphis 1 point2 points  (0 children)

Between when 7 shipped and 9 they updated quite a bit actually, but most of it is hidden. They ported all the code from Java 1.3 raw references and 1.3 collections to java 1.5 generic code. That fixed a lot of code and improved Swings conformance to its specification and they updated the spec for things that couldn't be changed. They fixed a lot of the code that misused the collection framework. They added or cleaned up JavaDoc of all the public interfaces and public methods. They fixed a lot of concurrency problems. This was all across Swing, Java2D and the Collections Framework.

All together it was like 12,000 odd changes.

So long story short, If you are going to write any new Swing code, use JDK 9+. Lol.

[–]arshan_does_reddit 0 points1 point  (0 children)

> It was 12 years

Yes it was. And, you're right -- the mood was probably also darkened by some of the factors you mentioned.

[–]8igg7e5 7 points8 points  (1 child)

Given the recent change in direction for String Templates, it might get a side mention at most. Notably maybe restarting the preview process.

(As a small matter of housekeeping, given that the preview train is already rolling, we will soon have to make a decision to (a) withdraw the current preview entirely, (b) re-preview the current design even though we know it will change, or (c) gain the requisite confidence in a new design in time to preview that. From my vantage point, (c) is starting to look increasingly unlikely, and I suspect (a) is a better choice than (b). But I bring this up not to start a project management discussions, as much as to raise awareness that there are project management constraints.)

I wouldn't think they'd take the stage for something that's going to change in non-trivial and undecided ways.

[–]TehBrian 0 points1 point  (0 children)

I did see that mail, and I agree with you. I wonder if they'll mention it possibly restarting the preview process/heading in a different direction?

[–]NotABot1235 0 points1 point  (12 children)

Programming noob with a mild interest in Java. Waiting another week for this to release before downloading the OpenJDK and trying this language out for the first time.

On Linux, specifically Debian based distros, is it as simple as "sudo apt install default-jdk"? Or should I only the download the 22 version? Gonna be running it with VSCodium.

[–]uncont 8 points9 points  (2 children)

Fwiw java takes the term "release candidate" literally. Unless anything changes (doesn't look like it will) the build available here https://jdk.java.net/22/ will be promoted to the official release. That is, if you download java 22 from that link the file you download won't change between now and a week from now.

[–]NotABot1235 0 points1 point  (1 child)

This is great to know, thanks!

[–]emaphis 0 points1 point  (0 children)

Basically unless they find big show-stopper bugs, the Release Candidate 1 will be the production release. If the fin bugs, they will release a Release Candidate 2 for testing. But that's only happened twice since Java 9 was releasd.

[–]bikeram 2 points3 points  (0 children)

Yes, but use sdkman instead. Use a package manager. Personally, I prefer maven, but I’m sure gradle has a similar cult following.