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 18 / JDK 18: General Availability
31–40 of 304 posts
Re: Java 18 / JDK 18: General Availability
#32Is 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.
Licensing. Oracle requires a commercial license
Re: Java 18 / JDK 18: General Availability
#33This 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).
I wish.
Re: Java 18 / JDK 18: General Availability
#34Is 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.
Licensing. Oracle requires a commercial license
Re: Java 18 / JDK 18: General Availability
#35This 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.
JVM performance is generally fine, and the language prevents you from introducing whole classes of memory safety bugs. You can still shoot yourself in the foot with native (JNI) extensions, but the decent performance of the JVM makes developers use JNI far less frequently than, say, Python or Ruby devs reach for compiled libraries.
JVM byte code decompilation is fairly trivial, so tools for the security scanning of artifacts are cheaper and more fully featured than similar tools for scanning machine code.
Re: Java 18 / JDK 18: General Availability
#36This 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
#37Earlier quoted context omitted.
Oracle's builds of Java are open source as well. The OpenJDK codebase is shared across all of the vendors that provide builds.
Thanks! So why would I pick Oracle's implementation?
Re: Java 18 / JDK 18: General Availability
#38Earlier 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 }
The good news is that a linter trivially detects this bug.
Re: Java 18 / JDK 18: General Availability
#39"I call it my billion-dollar mistake. It was the invention of the null reference in 1965. At that time, I was designing the first comprehensive type system for references in an object oriented language (ALGOL W). My goal was to ensure that all use of references should be absolutely safe, with checking performed automatically by the compiler. But I couldn't resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years. In recent years, a number of program analysers like PREfix and PREfast in Microsoft have been used to check references, and give warnings if there is a risk they may be non-null. More recent programming languages like Spec# have introduced declarations for non-null references. This is the solution, which I rejected in 1965." -- Tony Hoare
Let's give credit to C# and Dart for fixing this, and bring shame to Java and Go for not doing so.
Re: Java 18 / JDK 18: General Availability
#40This 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 pytho…
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, vavr is nice. Just, “run it all” and optimize for the golden path. If there’s an error account for it locally.