Live data from Hacker News

Java Is Underhyped

jackson.sh

461–470 of 808 posts

Re: Java Is Underhyped

#461
post #178

Earlier quoted context omitted.

> - The programs are very verbose for the functionality they provide. That's true for 2005, not 2021, with var, type inference, closures, streams, and other such features. And since forever getters/setters are auto-generated by the IDE (including Emaca and Vim) and can just be ignored, and Java today has Records which don't need them. > - If you do want to use Java ecosystem, there is Scala. Now you have exponential…

> No, you really don't. Production algorithmic trading app, 100k LOC, 8 GB heap, 258 threads, right now only using 105% CPU; Java 11, and this is the complete extent of JVM tuning we have done: -Xmx8g -XX:+ExplicitGCInvokesConcurrent Back in the Java 1.x days, you often did need to do careful JVM tuning. But for the past few years, you haven't. The ergonomics are enough for a very broad range of workloads.

Yeah G1GC has been a marvel for us as well (high traffic streaming video)

Re: Java Is Underhyped

#462
post #248

Earlier quoted context omitted.

> - The programs are very verbose for the functionality they provide. That's true for 2005, not 2021, with var, type inference, closures, streams, and other such features. And since forever getters/setters are auto-generated by the IDE (including Emaca and Vim) and can just be ignored, and Java today has Records which don't need them. > - If you do want to use Java ecosystem, there is Scala. Now you have exponential…

> Now you have exponential problems. Scala has less support, slower builds, and features Scala-devs are eager to abuse to make the code unreadable. Unfortunately, the Scala compiler is quite a bit slower than javac. In practice this doesn't hurt quite so much anymore; incremental builds make working even with large code bases quite snappy. Full-rebuild; get a coffee. The build tools for Scala have _massively_ improve…

The compile time is horrible, but improving, agreed. SBT is a serious travesty and I don't blame anybody who skips the entire language to avoid it.

Re: Java Is Underhyped

#463

Earlier quoted context omitted.

Kotlin solves most of the problems for us while leveraging the benefits of the JVM.

What's the state of server-side Kotlin now, is it usable and what kind of JVM are cloud hosts running it on? Kotlin seems like one of the best languages out there.

Kotlin is widely used internally at Amazon. In both AWS and retail.

Re: Java Is Underhyped

#464
post #256

Earlier quoted context omitted.

> pervasive use of `null` and `Object` Who is pervasively using Object? You are talking about a language that hasn't existed for a decade.

As a simple example, `x.equals(y)` accepts an arbitrary Object y. This one example has ramifications all over the place, e.g. I had a bug recently where I was checking if an element was in a collection, using `x.contains(y)`. That .contains method seems to use .equals, since it allows y to be any Object. In my case x was a collection of MyType values whilst y was a MyWrapper which I forgot to unwrap. Rather than givi…

Fun fact, this also happens in Scala - try to List.contains an object from a type different than that stored in the list. Compiles, returns false always.

Re: Java Is Underhyped

#465

Earlier quoted context omitted.

> So Java is not a bad choice. It's an excellent tech. I just don't have a use case for it. The language is underwhelming, the JVM is great.

It is, but if all you want is a JVM, Java is still probably the worse choice over Scala or Kotlin

Yeah, absolutely. It's objectively worse than most languages.

Re: Java Is Underhyped

#466

Earlier quoted context omitted.

> So Java is not a bad choice. It's an excellent tech. I just don't have a use case for it. The language is underwhelming, the JVM is great.

It is, but if all you want is a JVM, Java is still probably the worse choice over Scala or Kotlin

The exact opposite is true. Scala's and Kotlin's syntactic sugar comes with tonnes of overhead and additional allocation. Java is pretty raw compared to them and allows you to stay closer to the C-spirit and thus retain more control over the side effects of the code you write.

Re: Java Is Underhyped

#467
post #261

Earlier quoted context omitted.

Kotlin solves most of the problems for us while leveraging the benefits of the JVM.

Are there many companies seriously using Kotlin for large projects outside of the Android space?

Absolutely. Kotlin is *widely* used for backend code at Amazon.

Re: Java Is Underhyped

#468
post #439

Earlier quoted context omitted.

Acting like Java tooling isn't more difficult than other languages is dishonest. Starting with a Java project is considerably more complex than with most other languages. "Missing manifest" or issues with classpaths are not intuitive.

"gradle init --type java-application" Honestly I haven't had to deal with the issues you talk about in the last five years (which is as long as I've been writing java commercially, before that I was mostly a C developer). Having had recent experience with Go and Javascript/Node, I can't say either struck me as especially easier or more intuitive to get started with.

Most likely because you have dealt with them many times before that you don't notice them anymore or prevent them in the first place while setting up a project. But everytime I need to do something in Java I get bitten by this stuff, and I'm not the only one.

Re: Java Is Underhyped

#469

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…

To me Java is like a garbage truck. You get to work, start it up, do a nearly invisible but absolutely essential duty, then, at the end of the day, you turn it off and go home.

No one dreams about garbage trucks or puts one in a car show but they’re there and ready to go right back to work when you are.

Re: Java Is Underhyped

#470
post #381

This post from "an ignorant computer science undergrad" is pretty silly, so allow me to get a little silly in response. I think if Java's new features are an attempt to woo new developers, Java comes off pretty tragically, like the old guy in the club, trying stay relevant by showing off how it just got up to date with ideas that hit the mainstream ten years ago. Whoa, check out these record classes! Fresh stuff over…

How is this the top comment?
Post reply on HN