Live data from Hacker News

Java 16

jdk.java.net

121–130 of 327 posts

Re: Java 16

#121

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…

Here at Quobyte, we're developing a distributed file system that is partially written in Java. The JVM is rock-stable, fast, and developers are very productive in Java.

Re: Java 16

#122
post #55

Lots of shiny new toys to play with :) I like playing with new features and pushing to silly limits. Here's some fun things you can do now: Compiletime checked state machines with Sealed Classes [preview feature] https://benjiweber.co.uk/blog/2020/10/03/sealed-java-state-m... Autobuilders, Mixins, Conversions & more with Records https://benjiweber.co.uk/blog/2020/09/19/fun-with-java-recor... Pattern Matching fun http…

Nice to see that Records are finally out of preview. But note that Sealed Classes are still in Preview mode and are subject to change (or removal) in newer versions.

Removal is not likely, nor is major change. Most likely some minor changes.

Re: Java 16

#123

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…

Look into Spring Boot for cloud applications, it’s a big ecosystem

Re: Java 16

#124

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…

> and I can't think of any desktop applications that use Java anymore.

The desktop application everyone has to use to report the income tax in my country is written in Java. Which is nice since it runs anywhere that has a recent enough JRE; in a distant past, before it was rewritten in Java, it was first a DOS-only and then a Windows-only desktop application.

Re: Java 16

#125

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…

E. g. Backend services for webapps or HFT.

Re: Java 16

#126
post #117

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…

I work on the trading floor of an investment bank in Hong Kong. Our OMS is made entirely in low latency Java (no GC, lots of perf test, few C++ binding when really we must). Java allows us, contrary to our poor colleagues in algo still on C++ to work in team, manage dependency, use really good tooling, unit test easily, have libraries that work consistently all across the universe (that's a beef I have with Python: e…

> Our OMS is made entirely in low latency Java (no GC, lots of perf test, few C++ binding when really we must)

Any resources on how to do this?

Re: Java 16

#127

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…

Java is used a LOT on the back-end still.

Yes, golang is shiny new thing, but there is TONS of boring back-end done in Java.

Whole Alibaba runs on Java, for example. I know of some companies (won't share names but fill in the blanks) that used to be Go shops, that were eaten by Alibaba and they migrated from Go to Java.

Re: Java 16

#128

Looks like they added sensible no-boilerplate immutable data objects, and are trying to unbox their boxed primitives, yay for common sense at long last. While they're about it, they should also add immutable/copying data structures.

>While they're about it, they should also add immutable/copying data structures.

They will start with records[1], but I think all value classes (Valhalla) should have this functionality eventually.

You will be able to write:

   record Point(int x, int y){}
   Point pp = p with { x = 3; }

[1]https://github.com/openjdk/amber-docs/blob/master/eg-drafts/...

Re: Java 16

#129
post #27
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.

We see similar developments with C# borrowing features from F#, with records in v9, pattern matching, etc. While it's good for C#/Java, it does make it harder to push for adoption for a language such as Scala and F#. Why bother investing in the languages with a much smaller market share when the big boys adopt good bits and pieces from them constantly?

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?

Re: Java 16

#130

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…

> still

It's a very popular backend language. Ironically, "run anywhere" isn't much of a requirement for backend development.

> C++ is more portable because it doesn't require the JVM to run.

For backend development, this isn't much of an issue either way. These days, the main advantages C++ has to Java is startup time and no GC pauses.

It's also not as portable as you'd think. Take a look at cross-platform C/C++ projects and you'll see a lot of special cases for particular platforms.

Java's popularity mostly boils down to it's mature, has a large ecosystem, and is adequate for a lot of things. Unless you're writing an iPhone app or system-level code, it's unlikely to be a bad choice.

Post reply on HN