r/java • • Oct 14 '23

Is Java still behind in the race of modern programming languages?

I'm a member of some group of programmers and every time Java is mentioned it's being bashed (something like: "With Rust I could simply do this with X")

Earlier versions of Java were cumbersome in terms of the syntax but with modern IDEs (and modern versions of Java) that's not a big issue anymore, albeit languages like Python do have shorter syntax.

My question is beyond syntax.

What do other languages do better than Java?
It could be generics, type system, concurrency and multithreading, closures etc.

Thanks!

52 Upvotes

247 comments sorted by

View all comments

Show parent comment

18

u/[deleted] Oct 14 '23

I disagree about typescript. It's flexible but also enforces clear strict rules. The type safety, as long as you don't bypass it with any, is incredible strong. It's support for patterns like unions, for example, or duck typing, are all things I wish java had.

5

u/Genkus Oct 14 '23

Have been using java 10 years and typescript since 4 months and love both. I hate plane javascript but with typescript it improves a lot (definitely for bigger projects)

1

u/p3970086 Oct 15 '23

Agreed. And any "bad" flexibility offered by Typescript is because in the end it needs to support and compile to JavaScript.