Is there a reason to use Oracle's closed-source Java implementation instead of the opensource implementations? Asking as someone who's ignorant about Java. edit: per comments below, Oracle's Java is open-source too these days.
For some purposes a tested validated binary may be appropriate vs mystery meat someone threw through a compiler then shipped without testing.
Java 18 / JDK 18: General Availability
101–110 of 304 posts
Re: Java 18 / JDK 18: General Availability
#102Earlier quoted context omitted.
Was referring more to structured stack traces. You're able to shoot yourself in the foot in any language's error handling system - quite trivially at that.
But the problem is that checked exceptions create the same “what color is your function” problem for errors.
Re: Java 18 / JDK 18: General Availability
#103Earlier quoted context omitted.
Great error handling? What does that mean? Checked exceptions seem cool at first, but are really just nonsense… as your only real way of dealing with this is: 1. Catch, log and rethrow, or 2. Wrap as a runtime exception (so you don’t have to change every method signature up to main()) Sure, there’s option 3: catch and handle… but this is used 1/50 times, and the ergonomics of (2) overwhelm the utility of this. BTW, v…
Anyone not seriously considering option 3 as the default, with options 1 and 2 being the exception that one must have good reason to take, automatically disqualifies himself as ignorant of proper error handling. Of course you catch and handle errors. Or at the very least you must think about whether it makes sense to handle an error on the current abstraction level that you are on, which means you must always conside…
Re: Java 18 / JDK 18: General Availability
#104This 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 values backwards compatibility very highly, so if something runs today, it's likely to keep running without modification on future JVMs. (Though the 8->9 transition was pretty rough for some.) Compiled Java artifacts are usually portable across OSes and CPU architectures, so your build pipeline can be pretty simple even if your infrastructure is not. JVM performance is generally fine, and the language prevents y…
Then why do I have to have multiple JVMs installed, which I need to go through via trial-and-error, if I'm given some random java application?
Re: Java 18 / JDK 18: General Availability
#105This changes the default charset of the Java APIs to UTF-8.
I read that the Java 8's JVM's internal string representation is UTF-16 [0][1]. Is that still the case after JEP400?
[0] https://docs.oracle.com/javase/8/docs/technotes/guides/intl/...
Re: Java 18 / JDK 18: General Availability
#106This 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.
Re: Java 18 / JDK 18: General Availability
#107Earlier quoted context omitted.
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
#108Meanwhile, still using Java 8 at work
I see this everywhere. What's the excuse in your case?
I think at least some of my dependencies still rely on reflection features that are limited by Java 9.
Not OP by the way
Re: Java 18 / JDK 18: General Availability
#109Meanwhile, still using Java 8 at work
I see this everywhere. What's the excuse in your case?
Re: Java 18 / JDK 18: General Availability
#110This 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.
IMHO, Marketing. Java had so many marketing crazes that it's crazy. I still remember the "Java mobile game" fad from a dozen of years ago - Java this, Java that, Java for phone, Java for toaster... At some point, the public mind starts to associate "programming" with Java. Since there were (and probably always will be, unless we evolve into utopia) hordes of job-desperate people who would do anything to feed themselv…
People laugh at the cute "Java runs on four billion devices!" tagline but back in 1995 if you weren't doing Java, you were a last-century coder. It was so pervasive Brendan Eich even renamed his strange scheme-smalltalk mashup "JavaScript".