Live data from Hacker News

Java 18 / JDK 18: General Availability

mail.openjdk.java.net

221–230 of 304 posts

Re: Java 18 / JDK 18: General Availability

#221

Earlier quoted context omitted.

Worth noting that if you can , don’t stay on LTS. It adds cost which many modern teams can avoid[1]. It doesn’t mean enabling Java 18 on Production on day 1, but certainly it means adding a Java 18 compiler to your CI, running tests using Java 18, etc. [1] https://www.reddit.com/r/java/comments/o0m6g8/the_state_of_p...

Yes, newer JDKs should ideally be rolled into at least DEV and perhaps QA just so breakage can be found early and fixed early. STG/PRD of course is something else. Even if you don't use any of the new features, there may be deprecation warnings and such that one should be aware of sooner rather than later. Tweaking early to ensure compatibility with current-LTS and future-LTS versions is worth some cycles: if you don…

This discussion immediately brings to mind all of the iOS apps that become completely unusable the day a major iOS update is released, and then take a week to fix.

I get that not everyone has spare time and energy, but it doesn't take that long to grab a beta, put it on a device (or load up the simulator) and find out. Leaving it until the last minute just forces you into a panic, and seems irresponsible when you had months to just test your product.

Re: Java 18 / JDK 18: General Availability

#222
post #83
post #42

Earlier quoted context omitted.

If you need to run Oracle apps like EBS. They only work on their release, not openjdk. Side note: Avoid EBS at all costs if you can, unless you like spending money on consultants and like crappy obfuscated processes.

That wasn't the only reason why I left one job but their Oracle buy-in was a big factor. Things like paying 7 figures a year for support, and then having the Oracle support manager ask if they could redistribute the hot-patch I made to other customers.

Big enterprise vendors are always like that.

My first boss wrote the TCP stack for a long defunct mainframe, which was distributed via a “shared source” program that his employer paid for and eventually was licensed to his employer at significant expense.

Re: Java 18 / JDK 18: General Availability

#223

Earlier quoted context omitted.

What else would you use? Java is the shark that ate everyone else's lunch. At this point all you have as alternatives in the category of "easy to use for backend type stuff" is C#, and go. Both of which have their pros and cons but on the whole aren't bad choices. I guess like bellbottoms, Java is making a fashionable comeback.

This is my default answer. What else would you use? C# is the only realistic alternative in my opinion, and I could respect that choice. I work in Go currently and although I see the positives, I'd be less inclined to unleash a bunch of mid-level devs using Go to create a huge codebase. If I could have my way, personally, I'd go for one of the other fun JVM langs out there... but that's just me having fun.

> I'd be less inclined to unleash a bunch of mid-level devs using Go to create a huge codebase

Why?

Re: Java 18 / JDK 18: General Availability

#224

Earlier quoted context omitted.

UTF-16 represents a fairly reasonable compromise, not sure what your disgust is for. UTF-32 (with no BMP concept) doubles the memory usage of most international text and quadruples the memory usage of ASCII text (which is the most common), yet characters outside the BMP are barely used outside of emoji. Native UTF-8 in memory makes character indexing a non-constant time operation, which would bite people badly in cas…

> Native UTF-8 in memory makes character indexing a non-constant time operation The only reason that Java's UTF-16 has constant time indexing is because they use a braindead definition of character which is "UTF-16 codepoint". If you want constant time character indexing you need to go UTF-32. But obviously the downsides are too great for most users. So in practice everyone uses UTF-8 because it is usually the most m…

UTF-32 isn't really a solution either, unless you consider a scalar value to be a character; I bet almost nobody wants U+0308 to be "a character"...

Re: Java 18 / JDK 18: General Availability

#225
post #28
post #16

Earlier quoted context omitted.

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.

This is like saying that null references are a non-issue because it have been there since the 1970s and that "true" $LANGUAGE developers never collide head-first into invalid dereferences. If something is ridiculous and un-ergonomic, it stays ridiculous and un-ergonomic no matter what. Reference comparison by default is ridiculous and un-ergonomic.

Re: Java 18 / JDK 18: General Availability

#226
post #90

Earlier quoted context omitted.

> It sounds like a good idea, but I can imagine lots of downstream breakage, some of it not immediately obvious, with apps that make bad assumptions. You're not wrong, which is probably why they did it in this release. JDK 17 was an LTS release, and 18 isn't. The next LTS will be JDK 21 in September 2023: * https://www.oracle.com/java/technologies/java-se-support-roa... This presumably gives folks times to adjust bef…

We like to give Oracle stick (and rightly so) but this is rolling/LTS done right: you break stuff in the release right after the LTS one, to give people time to adapt.

It was just a coincidence. They do it right: ship when it is ready. LTS is not an openjdk term it is something that vendors might offer for any jdk version.

Re: Java 18 / JDK 18: General Availability

#227
post #16

Earlier quoted context omitted.

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

Only if you skip all the tutorials and don't use an editor that warns you about it. Which is another selling point for Java; it has the best editor support and quality assurance tools out there. It took years for e.g. Javascript to catch up and it's still a far cry from a proper typed language with tooling. I mean by that same logic, Javascript will confuse you as well because `{} != {}`, or C++ because of pointer me…

It's really says a lot that you have to compare with JS or Cpp so that Java comes out on top. Those are 2 extremely flawed languages that are the butts of cliché jokes well-known across every programming circle, their history alone has "HACK" written all over it.

Re: Java 18 / JDK 18: General Availability

#228
post #176
post #4

Earlier quoted context omitted.

This one looks interesting: "JEP 400: UTF-8 by Default": https://openjdk.java.net/jeps/400 It sounds like a good idea, but I can imagine lots of downstream breakage, some of it not immediately obvious, with apps that make bad assumptions. Edit: The risks section of the linked doc above does explain some of that, and there is some notable risk.

Windows default went over to UTF-8 from UTF-16 a few years back so its probably alignment with them especially with MS now rolling their own linux and java.

To the best of my knowledge, Windows still uses UTF-16 internally. They now support opting for UTF-8 as the charset in the 'A' APIs, but that doesn't mean Windows natively uses UTF-8.

Re: Java 18 / JDK 18: General Availability

#229

Earlier quoted context omitted.

I see this post is getting some downvotes; I'm not sure I agree with all of it myself. But I would ask those, who reject the premise here outright, to think back really hard to how things were in the 1990s. The Java brand was everywhere . It was a truly massive endeavour and one of the first languages to really go "viral" as the Solution For Everything. People laugh at the cute "Java runs on four billion devices!" ta…

People don't like to see their favorite languages bashed. It's completely understandable. I suppose there are many Java enthusiasts on here.

I mean, Java is not a liked language by any metrics, so I guess fans (myself included) are more than used to bashing. That’s why I don’t think that marketing helped the language become as great as it is. Sure, it had a part, but if something would have been substantially better it could have taken over a long time since java is not hypes at all anymore.

Re: Java 18 / JDK 18: General Availability

#230

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 popular for the same reason C++ and JS are popular, hype trains and lock-in. There's no good reason to use it in a new project, people saying "Performance" and "Tooling" need to take a good long fresh look at the language landscape, we're not in 2005.

A trivially easy replacement would be Kotlin, it compiles to the same VM (and additionally webassembly), it is designed and implemented by one of the leading IDE vendors, it can trivially call and be called from Java, it has tons of zero-cost syntactic sugar that covers the inhumane verbosity that Java buries you under till your eyes bleed and your hands scream. A well-designed language, what should have been all along.

Post reply on HN