Live data from Hacker News

Java 16

jdk.java.net

171–180 of 327 posts

Re: Java 16

#172
post #98

Looks like no type aliases still? Does anyone know if type aliases are anywhere on the road map for Java? Is there some philosophical objection to them?

What are aliases?

As in Scala:

    // define a type alias
    type UserId = Long

    // can be used as a regular type
    val userId: UserId = 123L
    val userIds: List[UserId] = List(1L, 2L, 3L)

Re: Java 16

#173

Earlier quoted context omitted.

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.

Wouldn't agree on the GO statement, yes GO is great in terms of performance but it still lacks some important language features AFAIK no generics, no proper exception handling. I honestly don't know how the GO ecosystem is, but I can't imagine it's as mature as java. Perhaps I'm wrong tho

> no proper exception handling.

That's just like saying Go does not have application servers, DI, IOC, ORM frameworks, runtime reflection and so on. Different languages have different ways of achieving user requirements. It is not one-to-one matching.

> ... I can't imagine it's as mature as java.

Yes, depending on perspective, not as mature or not as fossilized as Java.

Re: Java 16

#174

Earlier quoted context omitted.

> Java applets have been dead on arrival The only successful Java applet I know was Runescape (if that was an applet? it ran in browser), an RPG game that ran in Java in the browser, for 15 years or so roughly afaik, today they switched to a non browser based client instead. Other Java applets almost never worked for some reason. Like, sometimes I'd visit a website about some mathematical topic, and the whole browser…

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

Re: Java 16

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

Semi sad state of the universe

Re: Java 16

#176
post #167

Earlier quoted context omitted.

8 is still “modern” Java right? 11 didn’t add a ton ton for most developers.

I'd say that now with 15 adding records and instanceof pattern, Java 8 is finally looking pretty dated! You're also missing out on var and switch expressions, which are very visible features (as are records and instanceof patterns), so the difference should be obvious between a Java 8 codebase and a Java 15 one.

Var and switch were the biggest from Java 11, along with modules and the new GCs?

Re: Java 16

#177
post #117

Earlier quoted context omitted.

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…

> better be in a Java shitshow with slow idiots than in a C++ shitshow with autist geniuses :D Please don't use Autism as an insult. It's exceptionally degrading to conversation here and presents no value; it does nothing other than cast you in a negative light. I'll ~delete~ edit my comment if you edit the remark out, provided you do so before my ~delete~ edit threshold expires. Edit: delete threshold expired. Can o…

Op is probably here from wallstreetbets

Re: Java 16

#178
post #89

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…

Not quite. LTS doesn't mean anything if you mention just the Java versions. This is not e.g. Ubuntu LTS. In java you have different vendors that provide LTS and you need to pay for it. Oracle, Redhat, etc. provide LTS versions (and those happen to be 8, 11, but don't have to be). And there is one more sortof LTS: latest java version, because it always gets all the security and other bugfixes. Right now it is Java 16.

I struggle to imagine any meaningful definition for LTS that includes "tracking latest" except by coincidence (during the window of time when the most recent release is an LTS release).

Re: Java 16

#180

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'll give you a bit of advice I give to engineers I mentor. Go to a tech jobs site like dice.com, and put in a technology you're curious about. So, put in java for your zip code. See what jobs are available. Are they back end? desktop? Then you'll find out where java (and any other tech) is used, and how popular it is. For example, how many jobs are there for PHP compared to Java?

I'm not saying you should adapt a technology based solely on the number of jobs...but we all gotta eat. And on the flip side if you see Java jobs decline over the years...time to learn the one that's increasing :)

Post reply on HN