r/java • • Jun 10 '24

[deleted by user]

[removed]

616 Upvotes

594 comments sorted by

View all comments

746

u/HaMMeReD Jun 10 '24

Building software takes skills, java skills are common, thus Java is common.

Java also has an incredibly mature ecosystem (i.e. maven packages) and ways to utilize the ecosystem in more modern ways (i.e. Kotlin).

195

u/CubicleHermit Jun 10 '24

It also has a very mature runtime environment, multithreads well, and handles huge scale. Node is a lot better than it used to be, but it it is still compared to the JVM a less mature and scalable platform.

Also, a really good SOMETHING developer will be a lot more productive than an average ANYTHING developer; if you want to lean into shorter development time, hire really good people, and let them use the tools they are best at.

11

u/[deleted] Jun 11 '24

Yes, and it seems like OP is already kind of aware of a major advantage of Java when he makes the edit and says by speed he means development time. What about other speeds? Speed of computation is pretty damn important for many applications.

As far as I know, Java is the fastest portable OOP language. As long as this remains the case, Java will have value.

→ More replies (3)
→ More replies (10)

56

u/Ariel17 Jun 10 '24

Indeed. Every time I need to build something reliable, resilient, with known tools I choose Java. Verbosity is the only downside, but it has everything you will ever need and probed to death XD

56

u/[deleted] Jun 10 '24

And not all of us mind that verbosity!

20

u/vincibleman Jun 11 '24

As I’ve grown older I actually favor verbosity in a lot of ways. Can’t stand troubleshooting a magical two lines of code that have an immense amount of automagic built into them. Would much rather see the full loop with clear callouts to the individual functions.

8

u/[deleted] Jun 11 '24

YES. And give me the long method/function names. I want to know what you think they do, and be able to update them quickly if something has changed

19

u/938h25olw548slt47oy8 Jun 11 '24

With modern IDEs it really doesn't make that much of a difference anyway.

5

u/butt_fun Jun 11 '24

Was gonna say, the verbosity is always a pain to write and often a pain to read, but it’s easily worth it for the static analysis that you get from it

→ More replies (2)

1

u/alexspetty Oct 26 '24

Verbosity makes the intention behind the code a lot easier to decipher. I actually prefer it. Eloquence and long windedness go together, I suppose.

→ More replies (1)

34

u/Mixabuben Jun 10 '24

There is no need to use Kotlin now, Java 17+ has everything you need

32

u/HaMMeReD Jun 10 '24

Well, that's a bit of a gross oversimplification don't you think.

Like what if you want Null Safety? What if you don't like semicolons? Robust type inference?

31

u/drinkcoffeeandcode Jun 10 '24

Everything except the semicolons, and to that I say “grow up”

18

u/pwnasaurus11 Jun 11 '24 edited Apr 30 '25

ring quicksand tap desert paint pie handle head normal workable

This post was mass deleted and anonymized with Redact

6

u/thecodeboost Jun 11 '24

I was on board of that train as an early Kotlin adopter but although I'm still a Kotlin fan I actually think that particular argument doesn't hold much water. Writing Java code in Kotlin's style is exactly as null safe as native Kotlin code is. The only nuance is a compiler error versus a static analysis error. And because Kotlin insists on being null safe you have to start working around it every time you work with null-first libraries (which is pretty much most of time in the real world). Your mileage may vary of course but I find myself writing idiomatic J21 code way more and Kotlin way less as the two converge.

→ More replies (3)
→ More replies (3)
→ More replies (11)

4

u/leemic Jun 10 '24

Lambda with Receiver. I miss this in Java. I can quickly write my custom DSL.

→ More replies (5)
→ More replies (12)

1

u/Anxious-Pace-6837 Jun 11 '24

Also takes 17+ for the startup time of a mid sized app.

1

u/thefoojoo2 Jun 11 '24

Does it have a better alternative to the builder pattern?

2

u/koflerdavid Jun 11 '24

Generating the builder might be out of scope of a language feature. But JEP 468 will basically provide withers for records.

→ More replies (1)

1

u/WishNo8466 Jun 11 '24

It’s literally that simple. I would also add that LOTS of corporate codebases are written in Java. Apparently I pulled the short straw and got a codebase full of Perl and C++…

1

u/743389 Oct 22 '24

On the bright side, you can wear a T-shirt that says "Perl Is My Paycheck"

1

u/ecestudentoflife Jun 13 '24

I’m a big boy now

→ More replies (69)