Live data from Hacker News

Java Is Underhyped

jackson.sh

241–250 of 808 posts

Re: Java Is Underhyped

#242
post #182

Earlier quoted context omitted.

I bet it has more to do with their HQ location and feeling trendy than anything else.

Well, it's true popularity in tech is not necessarily related to quality. Trending does have an impact. But by experience, having a killer feature, and a good adoption story usually does much more. E.G: - PHP: easy to make web page in 2001 - JS: monopoly on the client side web - Go: simple concurrency and binary production - Rust: borrow checker - Python: "yes, you can do that too. Also in 2 lines" Etc.

- Ruby: "yes, you can do that 5 different ways in 1 line"

Re: Java Is Underhyped

#243
post #182

Earlier quoted context omitted.

I bet it has more to do with their HQ location and feeling trendy than anything else.

Well, it's true popularity in tech is not necessarily related to quality. Trending does have an impact. But by experience, having a killer feature, and a good adoption story usually does much more. E.G: - PHP: easy to make web page in 2001 - JS: monopoly on the client side web - Go: simple concurrency and binary production - Rust: borrow checker - Python: "yes, you can do that too. Also in 2 lines" Etc.

re Python: "...All actual work is done by C libraries though, you could just as easily use BASIC instead"

Re: Java Is Underhyped

#244
"Type guards are my least favorite TypeScript feature. They're essentially duck typing that you have to implement yourself and trust that they're implemented correctly." Amen

Re: Java Is Underhyped

#245

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…

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 agree that Java is low risk from a manager responsibility perspective: nobody has been fired for choosing it for a long time.

Now, from a project success perspective, I think it's not. I've seen a lot of Java projects fail, over engineered, full of spaghetti code, riddle with inscrutable abstraction, stuck in a glue of badly designed architecture that has been fossilized by the type system.

I'd say from a project risk perspective, it's a pretty average language, it has pros and cons, but they balance each other.

Re: Java Is Underhyped

#246

Earlier quoted context omitted.

Yes, but that's my point. If I don't need performance, Python is ok. If I do, I won't go Java, I will choose something that is built for performance. Python is good enough for 99% of my performances need. The last 1%, jumping to java is not a big difference, I'll use rust or go. I won't use go for the ecosystem, but it's unique characteristics: easy concurrency, dead simple binary production. Java can't beat that. IF…

> Python is good enough for 99% of my performances need. The last 1%, jumping to java is not a big difference, I'll use rust or go. Whilst I roughly agree, that's still a bit too simplistic. In particular, we might prefer something like Rust to write a performance-critical algorithm, but that forces us to make a decision: - Do we stick with Rust for everything else (networking, data plumbing, etc.)? This forces us to…

Agreed, it's just a general overview, I skipped a lot of nuances for the purpose of conveying my main message.

Re: Java Is Underhyped

#247
post #2

Thanks for the two upvotes so far! Please feel free to leave criticism of the article or my writing; I'm trying to strengthen my composition muscle.

I'm curious which editor/IDE you used while writing typescript? I've recently started writing typescript and I've been finding it more or less a mecca of good editor completions and LSP support, compared to what I was doing previously (Python in an old school editor) (I'm using VS Code for typescript).

Re: Java Is Underhyped

#248
post #7

There are a few reasons to avoid Java today. - The programs are very verbose for the functionality they provide. There are countless lines of getters, setters, and trivial constructors. While IDE helps to write them, it makes reading existing programs slow and frustrating. Lombok helps, but very few programs use it. - If you do want to use Java ecosystem, there is Scala. It also has strong type system, nice IDE suppo…

> - 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_ improved in the last 5 years. IntelliJ support is superb and VS Code with metals is shaping up very nicely.

I agree that since Scala is a unopinionated language, you need to be strict in what you allow your devs to do. Code reviews and agreements on levels of abstraction and concepts used is mandatory.

I've worked with multiple teams in the last 8 years and this discipline is important when working with Scala. Doing so will give you the opportunity to write clean, maintainable and readable code in a very powerful language.

Re: Java Is Underhyped

#249
I was surprised to find out that so many of the "software architecture" books are not about how to architect backend ecosystems comprising multiple communicating services, but instead are about patterns to use to organize large java codebases.
Post reply on HN