Live data from Hacker News

Java 20 / JDK 20: General Availability

mail.openjdk.org

81–90 of 356 posts

Re: Java 20 / JDK 20: General Availability

#81

And here I am still on Java 8 :/

Impressive how many companies are stuck on quite old java versions. We are a core API for payments services, and we need to force our customers to upgrade to newer Java versions as most of them don't support newer encriptyion protocols

Re: Java 20 / JDK 20: General Availability

#82

its amazing how much the world hasn’t been able to keep up with java. github PRs still have no syntax highlighting support for record and var

Why do you think that is? I thought things like the language server protocol made this a self service kind of problem. Who needs to be catching up?

Re: Java 20 / JDK 20: General Availability

#83
post #77

Earlier quoted context omitted.

Given the terrible result we came up with in the Python community, I understand the JS wants to take their time. It's a great feature, but it's hard to get right, especially on an existing language. Not to mention JS is not typed, but pattern matching that can't match typescript types would be terrible.

What's wrong with match? I've used it quite a bit and it is quite powerful.

The syntax is reusing regular python syntax with completely different effects, so you have to learn 2 syntaxes.

Trying to do simple things like matching the content of a variable will fail if you forget you have to use a dotted path if you want to avoid binding.

Trying to do advanced things such as "match a dict with variable key names and values, but you wish to enforce the number and the types and unpack them in variables" is ridiculously twisted to do, when it's even possible.

I use match/case, but it like the early years of type hints or asyncio: terrible ergonomics, and we know there is a ceiling to how much it can improve.

Re: Java 20 / JDK 20: General Availability

#84

And here I am still on Java 8 :/

I mean, that's OK though. Not sure why this is considered such a bad thing. You're missing out on some new language features, sure, but Java 8 is still reliable and rock solid. There's lots of companies that have hesitation or even inability to upgrade, hopefully there's at least some initiative and/or direction to do so.

A company that is head-in-sand deliberately not upgrading from Java 8 is one thing. A company that is just being conservative and intentional about the upgrade path, that's another entirely different thing.

I don't mind a company that has been using Java so much that it's just a slow process for them to get on the next thing. Old libraries that need to be recompiled for Java modules, etc. Hopefully it happens for you soon.

Re: Java 20 / JDK 20: General Availability

#85
post #77

Earlier quoted context omitted.

Given the terrible result we came up with in the Python community, I understand the JS wants to take their time. It's a great feature, but it's hard to get right, especially on an existing language. Not to mention JS is not typed, but pattern matching that can't match typescript types would be terrible.

What's wrong with match? I've used it quite a bit and it is quite powerful.

Its incredibly powerful! One downside is variables captured in the match are lifted to the function level. The lack of block level scoping in the match statement leads to a lot of people shooting themselves in the foot by overwriting a variable that they didn't intend to. On a personal note, I find the 2 levels of indentation to reach the case body to be too much as well... but that's just a personal preference.

Re: Java 20 / JDK 20: General Availability

#90
I'm curious what is meant by a "preview feature, or second preview feature, or..." in a released product?? I don't suppose they are going to remove it later. So in what way is it a preview? Are they signalling that it might have breaking changes in the future?
Post reply on HN