Live data from Hacker News

Java 20 / JDK 20: General Availability

mail.openjdk.org

71–80 of 356 posts

Re: Java 20 / JDK 20: General Availability

#71
post #33

Java 8 is the best Java.

Why? Java 11 is already leaps and bounds better than Java 8.

I'm in Security and 8 generates a lot of revenue for me :)

I'm not sure that it's inherently insecure, there is just a ton of old stuff in the ecosystem still chugging away.

Re: Java 20 / JDK 20: General Availability

#72
post #60

Earlier quoted context omitted.

I'm not a Java user, but I really don't love the overloading of `if` in Python (statement, ternary, comprehensions), so introducing a new keyword here seems pretty reasonable to me. And don't even get me started on `static` in C++.

OK, no static then, but what about if constexpr (...) ? :D

Also `if consteval {...}` in C++23. But really "if" still semantically means the same thing in all of these. Unlike "static", which is all over the place.

Re: Java 20 / JDK 20: General Availability

#73

Earlier quoted context omitted.

> I would prefer to have HKTs and typeclasses, so I may implement my own IO monad. I'm not a Java developer, and I haven't even read about higher kinded types or typeclasses (the theory side of programming is my weakness); but you picked my curiosity with this. Can you elaborate how concurrency done this way would look in Java?

Ideally like this: https://zio.dev/reference/#concurrency Or this: https://hoogle.haskell.org/?hoogle=fork

Some discussion on zio in loom-dev mailing list recently: https://mail.openjdk.org/pipermail/loom-dev/2023-March/00535...

Re: Java 20 / JDK 20: General Availability

#75
post #61

As a Clojure programmer, I don't care about any of the Java language features or improvements, but I'm super happy that I'm getting a state of the art JVM that is continuously developed, maintained, extended and optimized, over a time scale of decades. This is incredibly useful: having a good VM to run your code in, with good modern garbage collectors, is not an obvious thing (as many other languages have learned). T…

The same applies to Clojure CLR, right?

Re: Java 20 / JDK 20: General Availability

#76

Earlier quoted context omitted.

https://github.com/tc39/proposal-pattern-matching I'm not sure if it's stalled or not. But it's being discussed.

We're still developing this proposal. be patient LOL

Sorry, that was rude of me. I know it's a ton of work, and am endlessly appreciative of the work you (I assume?) and others have been doing to push this forward.

Re: Java 20 / JDK 20: General Availability

#77
post #26

Now even Java has pattern matching, what's Javascript's excuse? Literally the only feature preventing Typescript from being my perfect language.

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.

Re: Java 20 / JDK 20: General Availability

#78
post #70
post #33

Earlier quoted context omitted.

Why? Java 11 is already leaps and bounds better than Java 8.

Not the parent poster, but I can see why: IMHO, the best new feature for Java was try-with-resources (Java 7), and the second best new feature was all the functional stuff in Java 8. On the other hand, Java 9 started the introduction of several breaking changes (it took years before I stopped seeing updates to Java libraries to fix their compatibility with Java 9 and Java 11), so it can be seen why someone would thin…

IMO you're neglecting the thousands of improvements in the HotSpot runtime.

Re: Java 20 / JDK 20: General Availability

#79
post #69
post #26

Now even Java has pattern matching, what's Javascript's excuse? Literally the only feature preventing Typescript from being my perfect language.

I don't see a huge benefit for pattern matching in JS outside of it being expression based rather than statement based. Either way, the benefit has to be enormous. It's a feature that can easily break existing code.

How would it break existing code?

Re: Java 20 / JDK 20: General Availability

#80

Earlier quoted context omitted.

Ideally like this: https://zio.dev/reference/#concurrency Or this: https://hoogle.haskell.org/?hoogle=fork

Some discussion on zio in loom-dev mailing list recently: https://mail.openjdk.org/pipermail/loom-dev/2023-March/00535...

Loom is useful as an underlying mechanism for an IO monad. What I mean is that Java as language still lacks important features so they have to deliver half-baked things like that "structured concurrency". From my point of view these new abstractions are evil - the better ones were out there for a while.
Post reply on HN