Live data from Hacker News

Java 18 / JDK 18: General Availability

mail.openjdk.java.net

21–30 of 304 posts

Re: Java 18 / JDK 18: General Availability

#21
post #16
post #8

Earlier quoted context omitted.

I'll try: Java is a proven, boring and "easy" language without much surprise, with a big standard library and ecosystem.

Java is great, but here's a surprise: if (str1 == str2) { // oops }

That’s not an oops. You’re comparing pointers.

Re: Java 18 / JDK 18: General Availability

#22

This is tangential and possibly too open ended to be productive but worth a shot anyway. Why is Java so popular? I know of a major Silicon Valley company that's migrating their backend to it. Why Java over other languages? Or maybe there's not really other viable options? I'm speaking as someone who spent the last 6 years focused on frontend web technology.

The language is simple. Reasonable performance, lots of opportunities to tune that performance without changing code. Great error handling. Works across all platforms in most cases. The tooling has a long standing reputation for being incredible, given what Eclipse and Jetbrains have done for the community. It integrates nicely with native code, and is easy enough to interface with (compared to e.g. Node.js and python, which have hellish bindings). Strictly typed, which has a lot of benefits. Lots of long-standing libraries that have been battle tested and still work even today. Great ability to mock, inject, and invert dependencies.

No language is perfect of course, the point isn't to start a war. I don't personally use Java for my own projects anymore but I can see why it's very attractive.

Re: Java 18 / JDK 18: General Availability

#23
post #16
post #8

Earlier quoted context omitted.

I'll try: Java is a proven, boring and "easy" language without much surprise, with a big standard library and ecosystem.

Java is great, but here's a surprise: if (str1 == str2) { // oops }

Yeah, I hate that about Java.

Re: Java 18 / JDK 18: General Availability

#24
post #18

This is tangential and possibly too open ended to be productive but worth a shot anyway. Why is Java so popular? I know of a major Silicon Valley company that's migrating their backend to it. Why Java over other languages? Or maybe there's not really other viable options? I'm speaking as someone who spent the last 6 years focused on frontend web technology.

Java developers are cheap and easy to find. There are libraries for everything that you would need - AWS SDK, Redis, etc. Performance is tolerable and can be improved with things like Micronaut and native ahead of time compilation (GraalVM).

They're not cheap :) or -- I'm not sure what you mean by cheap, but good Java coders are generally amongst the best paid ones.

Re: Java 18 / JDK 18: General Availability

#25

This is tangential and possibly too open ended to be productive but worth a shot anyway. Why is Java so popular? I know of a major Silicon Valley company that's migrating their backend to it. Why Java over other languages? Or maybe there's not really other viable options? I'm speaking as someone who spent the last 6 years focused on frontend web technology.

The JVM is great. It's easy(-ish) to deploy and there is a library for anything you can possibly think of, probably more than one, on Maven. It handles large throughput and big memory usage very well and is extremely tunable.

Using the JVM doesn't mean you're limited to Java anymore, and hasn't for a long time. I have built software for the JVM for the past 6+ years nearly exclusively in Clojure with only a few moments where I needed to dip down into Java proper.

Re: Java 18 / JDK 18: General Availability

#26

This is tangential and possibly too open ended to be productive but worth a shot anyway. Why is Java so popular? I know of a major Silicon Valley company that's migrating their backend to it. Why Java over other languages? Or maybe there's not really other viable options? I'm speaking as someone who spent the last 6 years focused on frontend web technology.

I think it has a relative speed performance over languages that are interpreted (runtime).

It also has an ecosystem of tooling to monitor and profile built both into the JDKs and by teams across Silicon Valley (eg first class bazel support).

I’m in one of these companies now, and while I’m certainly productive using Java, it’s also got huge downside in the community which these companies don’t really care about.

Never have I seen so much cargo cult practice. The ecosystem isn’t great, with hard to google docs and everything pointing you to a poorly written baeldung article.

Java gets no one excited. And, it gets no one fired.

Re: Java 18 / JDK 18: General Availability

#27
post #21
post #16

Earlier quoted context omitted.

Java is great, but here's a surprise: if (str1 == str2) { // oops }

That’s not an oops. You’re comparing pointers.

Still, coming from other languages, it is all too easy to write this and this silently fails without any warning.

This is consistent with the rest of the language, but I'd bet one rarely wants referential equality when comparing strings.

People commenting "yeah but that's because you are a newbie / you are comparing references and you should know better" miss the point I think. I can easily see myself making this mistake while fully understanding what's going on.

Re: Java 18 / JDK 18: General Availability

#28
post #16
post #8

Earlier quoted context omitted.

I'll try: Java is a proven, boring and "easy" language without much surprise, with a big standard library and ecosystem.

Java is great, but here's a surprise: if (str1 == str2) { // oops }

If you actually understand Java, you'll understand why this is wrong. Only newbies have confusion about this, most of which dissipates when you actually learn the language you're working with. Tired of this 20+ year old "flaw" being used as cannon fodder.

Re: Java 18 / JDK 18: General Availability

#29

This is tangential and possibly too open ended to be productive but worth a shot anyway. Why is Java so popular? I know of a major Silicon Valley company that's migrating their backend to it. Why Java over other languages? Or maybe there's not really other viable options? I'm speaking as someone who spent the last 6 years focused on frontend web technology.

It's rather easy to use, stable, has a really decent standard library, the tooling is excellent, it's performant, etc.

There are 3rd party libraries and integrations for _everything_ and it's comparatively easy to find skilled developers with years of experience.

Re: Java 18 / JDK 18: General Availability

#30

This is tangential and possibly too open ended to be productive but worth a shot anyway. Why is Java so popular? I know of a major Silicon Valley company that's migrating their backend to it. Why Java over other languages? Or maybe there's not really other viable options? I'm speaking as someone who spent the last 6 years focused on frontend web technology.

Language with a fast runtime minus startup (although maybe they've fixed the startup since I last looked) that is incredibly tunable to fit your specific needs for good performance profile, while not needing to manage raw memory the way c or c++ would.

Personally I prefer c#, but a lot of places already were using Java in significant ways before c# became good (IMO 2.0ish) and saw no reason to change.

Post reply on HN