News for hackers. Stuff that matters.
Re:Java Is Underhyped by dunefox on Friday April 16, 2021 @08:43AM (#26833166)
> 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.

Re:Java Is Underhyped by hannasanarion on Friday April 16, 2021 @09:41AM (#26833735)
It is, but if all you want is a JVM, Java is still probably the worse choice over Scala or Kotlin
Re:Java Is Underhyped by bitcharmer on Friday April 16, 2021 @10:16AM (#26834154)
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 by smabie on Friday April 16, 2021 @11:22AM (#26834961)
You can write Scala to pretty much just look and run like old school Java if you want.

I haven't seen any benchmarks, but I doubt a Scala app written idiomatic style would be any slower than the Java version written in idiomatic style.

Also, what is this C spirit we are trying to stay close to? I'm certainly not interested in any "C spirit"

Re:Java Is Underhyped by bitcharmer on Friday April 16, 2021 @11:48AM (#26835373)
The C spirit I'm referring to is the raw, verbose and low-level-ish nature of writing code in C. For high-performance/low-latency Java apps it is absolutely crucial to have this level of control over code and resulting instructions emitted by the compiler. On the other hand - if you don't care about it and want to focus on domain-level stuff you absolutely can. This is what I find the most appealing about Java.
Re:Java Is Underhyped by dunefox on Friday April 16, 2021 @10:15AM (#26834135)
Yeah, absolutely. It's objectively worse than most languages.