Live data from Hacker News

Java 16

jdk.java.net

11–20 of 327 posts

Re: Java 16

#12
Very cool to see that Scala continues to have a huge impact on Java’s roadmap.

Records and Sealed Classes are borrowed from Scala.

Could be not the best news for new Scala adoption, but good news for developers having better abstractions in Java

Edit: Kotlin, and other languages should also mentioned since they also include similar features. I still think Scala has had the most influence over the years.

Re: Java 16

#14
post #3

Why they decided to change the keyword rules to use "non-sealed" is beyond me. Surely, there might be other choices? Closed/unclosed? Unsealed?

It's the same story in C++, co_await, co_yield. The sole purpose is not to break other people's code.

Re: Java 16

#15
post #3

Why they decided to change the keyword rules to use "non-sealed" is beyond me. Surely, there might be other choices? Closed/unclosed? Unsealed?

Yes. It feels out-of-place. All other keywords are like one word: enum, class, public, protected, native, sealed, ... But looks entirely different: Two words, connected by a hyphen. But I think, it was done because of backwards compatibility. If they would have called it "closed", it would maybe break hundreds of programs that have methods/variables called "closed"

I made this argument before, but was informed that they have support for contextually distinguishing between names and keywords some time between Java 8 and 10. So while e.g. the introduction of enum did cause all these issues for variables named enum, "var" did not and a hypothetical "closed" would not.

Re: Java 16

#18

Curious how many folks here experimented with the now depreciated Ahead-of-Time Compilation feature?

I did experiment with it to improve the startup times of one of my applications (Java Swing). The gain was quite small, nearly not noticeable.

Re: Java 16

#20
post #12

Very cool to see that Scala continues to have a huge impact on Java’s roadmap. Records and Sealed Classes are borrowed from Scala. Could be not the best news for new Scala adoption, but good news for developers having better abstractions in Java Edit: Kotlin, and other languages should also mentioned since they also include similar features. I still think Scala has had the most influence over the years.

I think the reaction has been more to Kotlin than Scala.
Post reply on HN