Live data from Hacker News

Java 16

jdk.java.net

221–230 of 327 posts

Re: Java 16

#221

Earlier quoted context omitted.

F#'s relationship has been vastly overblown. The truth is that they're about as closely related as C# and Objective-C. In the same way that the overlap between C# and ObjC is basically just the C bit, the overlap between F# and and OCaml is basically just the ML bit. (Actually, even less than that.) You could say that it was inspired by OCaml, but it includes almost none of what makes OCaml OCaml, and adds a lot of i…

To someone who has a passing familiarity with OCaml, but none with F#, can you elaborate? Because I do hear the comparison frequently. Do people just draw the comparison because they don't actually know of any other ML languages besides OCaml?

I haven't touched OCaml in a while, but the things it has and F# doesn't that I can remember include: Functors (in the ML sense), camlp4, polymorphic variant types, multiple inheritance, class interfaces.

Things F# has that OCaml lacks: Extension methods, units of measure, type providers, quotations, computation expressions, active patterns, overloading.

Probably most of the F# things could be (and perhaps have been) added to OCaml with camlp4, which is more powerful than F#'s quotations. Versus, F# may never be able to have all of OCaml's ad-hoc polymorphism features. So there's that. But I'm mainly meaning to compare what's actually built into the language.

Re: Java 16

#222

Earlier quoted context omitted.

The only applet I know of outside the early few years of hype that still works and does something useful is Falstad's circuit simulator. https://www.falstad.com/circuit/

Actually that one has been rewritten in JS! The fast loading and no gray screen gives that away :D There's a link to the original Java version below, that one doesn't work for me anymore, I no longer have a java-enabled browser

>* The fast loading and no gray screen gives that away :D*

Well, plus the fact that no modern browser runs Java applets...

Re: Java 16

#223

Earlier quoted context omitted.

I think it's interesting to discuss how many are stuck on java8. It was a long time many of us were stuck on java6 or 7, and finally got up to java8. But then when 9, 10 and 11 came no one made an effort to upgrade. Why? And now we're at 15 and people are starting to feel the heat. We only migrated our main service from 8 to 15 a month ago (AWS deprecation), but still have lots of 8 code laying around (luckily some o…

Speaking from personal experience, the creators of most of the recent JDK versions have made very poor efforts to explain the changes, it's mostly just a list of RFC type documents, and who has time? An example of something that compares favourably would be Go, where they always blog about the changes, and there's easy to find official language documentation (and not just autogenerated API docs).

Have you tried for example the linked article with all the JEPs listed with lengthy descriptions? And with links to relevant mailing lists if it didn’t satisfy your curiosity?

Re: Java 16

#224

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

Only briefly tested it. I thought RH's Quarkus project made use of it, didn't it? What's the post-16 way of Java AOT compilation?

Graal is a separate project and jaotc did use that. I believe the reason for the “separation” is that the two projects have different priorities and didn’t develop at the same pace. I believe graal is still only at version 11.

But since Java, the language is highly backward compatible, one can trivially use Graal as is (without the preview features though)

Re: Java 16

#225

As a student most of the way through a Java course, I'm wondering what Java is still used for. Java applets are dead, Android is moving on to Kotlin (apparently Google got in legal trouble with Oracle even though Java is "open source?"), and I can't think of any desktop applications that use Java anymore. Java is supposed to be able to "run anywhere," yet C++ is more portable because it doesn't require the JVM to run…

To give you some more details of how Java can be used in the backend, while there's obviously unknown "generic business logic" there's also big name infrastructure pieces you can look up:

- https://en.wikipedia.org/wiki/Apache_Hadoop

- https://en.wikipedia.org/wiki/Apache_Kafka

- https://en.wikipedia.org/wiki/Apache_Cassandra

- https://en.wikipedia.org/wiki/Apache_Lucene

- https://en.wikipedia.org/wiki/Elasticsearch

- https://en.wikipedia.org/wiki/Apache_ZooKeeper

- https://en.wikipedia.org/wiki/Apache_ActiveMQ

Re: Java 16

#226

Man, I hope the migration to Java 11 that my infrastructure team started 18 months ago is going okay.

Can't read whether this is sarcastic or tongue in cheek ;-)

Java 11 is the newest LTS release. The next LTS release will be Java 17. Many companies won't touch anything that isn't LTS. There are still a large number of companies staying on Java 8 :shrug:

Re: Java 16

#227
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?

Following the various openjdk mailing lists is an awesome way of learning about all the considerations that go into making language choices for java. And indeed this was not random, but the result of a lot thinking (as shown in a another sibling post).

Re: Java 16

#228

Earlier quoted context omitted.

If you enjoy pattern matching in Java, I would recommend checking out the latest & greatest that C# has to offer as a comparison: https://docs.microsoft.com/en-us/dotnet/csharp/pattern-match... Being able to combine pattern matching with switch expressions has allowed us to construct extraordinarily concise state machines for our UIs.

I used Java a lot and like some aspects. But I think C# is way ahead in some important ways and Java is playing catch-up

Java is really conservative language-wise while C# is pretty much add everything you see, reminiscent of C++.

Also, a significant part of Java development happens at the runtime level, where I would wager the catch-up is in the opposite direction, in some areas by quite large margins.

Re: Java 16

#229

Earlier quoted context omitted.

Java 8 → Java 11 → Java 17. Those are the LTS releases. If you want to follow a release cadence similar to Java 5 → Java 6 → Java 7 → Java 8, that's what you'll track. The intermediate releases can be used to test against, but adopting them too soon often means tackling lots of issues in your dependencies. And updating your application servers to a new major Java version every six months is not something you can do e…

If you're doing green field JVM developer and NOT using big frameworks like Spring or an app server it is pretty safe to use the intermediate releases.

... if you're willing and able to update your entire app to a new JDK the month it comes out.

This is where I hope Java adopts the .NET support lifecycle. .NET also has (relatively) fast-paced releases now, once per year with LTS every other year, but the prior non-LTS is supported for 3 months after the next one comes out. That's still pretty aggressive, but it's very doable with a modern app to upgrade within 3 months.

With Java, JDK 15 support ends this month, the same month that JDK 16 comes out. Not just that, but we're halfway through the month already. So if you're on JDK 15, you now have only two weeks to upgrade and still be supported, according to their official schedule.

https://www.oracle.com/java/technologies/java-se-support-roa...

Edit: I may have been too generous in my reading of their support roadmap. It seems like the previous non-LTS version is immediately out of support as soon as the new one "supersedes" it.

Re: Java 16

#230
post #157
post #129

Earlier quoted context omitted.

But it's fine, we don't really care about language adoption if the best most supported most tested most hiring languages swallow their features, right ? What matters is what we do with the language, more than the name of it no?

The problem (as I see it, anyways) is that the 'big boys' that I referred to in my initial comment have been around a long time (2000 for C#, 1995 for Java) and over that long history, have had a slew of language changes. They are starting to suffer from the same problem that C++ suffers from, where every shop defines their own subset of the language with which they use. Meanwhile, the languages that they graft featu…

But that’s the great thing about java, it is still a pretty lean language even with its age.
Post reply on HN