Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

it consistently works and has a huge ecosystem, but "beautiful" is never a word I would use to describe java. off the top of my head:

* no type level concept of a const object (ie, you can have a const reference to a List, but never a reference to a const list). this makes const-ness an implementation detail of the class itself! so frustrating that List:add() can throw depending on the underlying class.

* lack of tuples (and no, record doesn't count). this is just a syntactic sugar thing, but I really miss it from c++ and python.

* var is far less powerful than c++ auto.

in most cases, I actually prefer the syntax of c++, which is really saying something.



> [Java] has a huge ecosystem

But does it though?

I've just taken a new job writing primarily Java whereas I was previously writing mainly python and typescript.

One of the first things I've noticed is how dead Java's ecosystem (Maven central) seems in comparison to other ecosystems like PyPI, NPM or Cargo.

(Also side note: I've published packages on each of these registries and the publishing process for Maven central is comically terrible! This has to be discouraging people from contributing to the ecosystem.)


probably depends on what kind of stuff you're working on. I mostly build web services and data pipelines on AWS, where java is still the best supported language (even if others have joined the list of officially recommended).

java might not see the same brisk pace in library development as other languages, but it's also 30 years old. aside from core issues with the language that can't be papered over by 3P libs, what's missing?


The missing constness is the biggest flaw of them all, in my opinion, especially when reading other people's code. Always having to dig deep to make sure an object isn't altered somewhere down the line gets old really quick.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: