Live data from Hacker News

Java Is Underhyped

jackson.sh

281–290 of 808 posts

Re: Java Is Underhyped

#281

For my use cases, Java has all the wrong compromises: - not high level enough to compete with Python/Ruby/JS/PHP, etc - not low level enough to compete with Rust/D/Nim/Zig - not specialized enough to compete with Erlang/R/Go/Julia - not opinionated enough to compete with Lisp/Haskell So why use Java ? It's good, it's fast, it's productive, it's well supported, battle tested and documented for decades with a huge pool…

I almost considered using Java instead of Erlang for a project I started working on. For one, my mind is still stuck in trying to model systems in a very OOP way, and I was (am?) struggling with OTP. I figured I could pull in Akka to get some of the nice Erlang stuff.

But Erlang was just such a good fit for this project. I wasn’t so huge on the Java version of Akka. I also briefly looked at Scala, but I avoid Scala for similar reasons to C++ and Haskell. The nativess of a lot of the features I wanted to Erlang just looked better and it will be a cool homage to the language’s roots.

Also this is probably more my fault, but I don’t really understand how distribution works anymore. Supposedly Oracle JDK is no longer supported and you’re supposed to package a JVM with your application, but all the big Java apps still require me to have a system wide JVM to run them? OpenJDK seems to work fine for now.

Also after toying with a LAPB implementation, I’m so mad other languages don’t have a good type for dealing bit level data. Bitstrings are a godsend.

Re: Java Is Underhyped

#284
post #222

The amount of vitriol Java receives in the game development space is rather strong. However, whenever people dismiss Java as being a bad language, I can't help but think of Minecraft. Yes, it's one of the few mainstream titles where Java has been successfully applied, but I believe Minecraft's success was specifically because it was written in Java. With no JVM, there would have been no Minecraft mods at the level of…

> The amount of vitriol Java receives in the game development space is rather strong. Java is a language with mandatory GC, tiny objects scattered around the heap (poor locality), and no value types or low-level memory access. This makes it very poor for games (you know, other very basic ones). But they're rapidly addressing these concerns.

> no value types or low-level memory access.

i dont think you need value types at all, and you can simulate it by using byte buffers with an abstraction on top of it. After all, what's the difference between value types and a byte array?

As for things like low level memory access - you also don't need that in most cases. Graphics libraries will give you enough access. And for any other case, you can always JNI into native code, or call any existing system calls or libraries. Interop between java and native is not that bad (cumbersome for sure, but still possible).

The only reason java gets poor performance is the coder doing java is too used to producing garbage (or is too inexperienced to write high performance java code). you can easily avoid most performance problems in memory by pre-allocating and reusing memory by pooling. These techniques are already commonly employed in C.

Re: Java Is Underhyped

#285
post #96

Earlier quoted context omitted.

Use OpenJDK! Never touch anything from Oracle. Then you will be fine. Oracle is the company that wants you to buy a license for your MariaDB(!) instance running on a small AWS instance! Yep, that happened. Source: have worked with Java for years, three of those around Oracle products.

> Use OpenJDK! Never touch anything from Oracle. But OpenJDK is Oracle's. They are the primary contributors to the project, and they really made it 100% open-source.

You can use any other fork/build like AdoptOpenJDK or any other. It is open-source like Linux Kernel...

Re: Java Is Underhyped

#287

Ah another new dev enamored with IntelliJ. You'd think one day they'd realize that it's the IDE they love, not the language. But in my observation, they never do. Reminds me of a rationalization I heard once about how people pick their brand of cigarettes. They all taste like crap until you're finally addicted, then the one you happen to smoke at the time is now your brand. Every new language / stack now gets compare…

Exactly, tooling is underhyped, programming languages do not exist in a vacuum. Intellij is at the top of the power continuum as far as I'm aware. It is a perfectly valid to pick Java just for this single reason imo.

Re: Java Is Underhyped

#288
post #184

Earlier quoted context omitted.

Where is Rust AWT? Not to mention Swing, JavaFX, or even an whole mobile ecosystem.

Well, if we create a desktop app, the Python + C bindings will be a better choice for my own project. Easier to dev, equivalent perfs, equivalent libs (and the QT Rad is excellent). Java does have android right now, although it has to share with ReactNative, Xamarin and flutter. Again, for different compromises.

So apparently Rust isn't that better than.

Java also has the IDE ecosystem between Netbeans, Eclipse and all JetBrains offerings, with exception of Apple and Microsoft offerings.

Re: Java Is Underhyped

#289
post #272

Earlier quoted context omitted.

You use Java because it is low risk. I think it might be lower risk than any other language in terms of design patterns, hiring, library support, run-time surprises, etc. The language itself isn’t great though. Java solutions tend to be bloated and make it hard to decipher the underlying domain logic. I certainly wouldn’t pick Java for a small team of experienced developers.

I generally agree, except the part about the low risk of runtime surprises. Java's type system is so weak that it doesn't even prevent null from inhabiting almost every type. The programmer is then forced to manually reason about when a value can be null or not, and of course humans can easily make mistakes in doing so. This inevitably leads to NullPointerExceptions at runtime when a project becomes sufficiently comp…

> Java's type system is so weak that it doesn't even prevent null from inhabiting almost every type.

"So weak"? You do realize that this is basically where every language was less than a decade ago?

Re: Java Is Underhyped

#290
post #184

Earlier quoted context omitted.

But not Rust. And Go is better if you do I/O. That's my points. Compromises. I'm not saying "Java is bad". I'm saying, "I have no use case where I, personally, would use Java over something else." I do know other people have use cases for it. I just don't, because those compromises don't make sense for me.

Where is Rust AWT? Not to mention Swing, JavaFX, or even an whole mobile ecosystem.

To be fair, even people deep in the Java ecosystem don't like its desktop application/GUI support.

Its only saving grace is that all other cross-platform GUI systems also suck, and if you're doing everything else in Java it might be the path of least resistance.

Post reply on HN