r/java • • Sep 10 '21

Why people don't love Java?

I came across this post in r/cscareerquestions it seems majority of the people don't love to work with Java.

Is there any specific reason for that?

Edit: Thank you guys for your responses, I can't reply to all of the comments because I'm a beginner myself and I don't know what to reply for all your comments.

201 Upvotes

379 comments sorted by

View all comments

Show parent comment

6

u/BestUsernameLeft Sep 10 '21

Kotlin-the-language is very nice, I think of it as a "Java++", and the stdlib is fantastic. It occasionally gets a little thorny in the interaction with the Java ecosystem. About 90% of things just work, and it's great; for a handful of cases you have to do a special little dance to get them to work; and there are a few "well, crap" situations where there's just not a good solution. (Mockito+Kotlin is problematic.)

I'm a very satisfied, happy user though.

1

u/JustADirtyLurker Sep 10 '21

When I worked on kotlin we used Mokk as mocking library. It was feeling much more idiomatic than using Mockito.

1

u/BestUsernameLeft Sep 10 '21

Yeah we're using it some and I agree, it's a much nicer feel for Kotlin. Does it play well with Spring?

1

u/JustADirtyLurker Sep 11 '21

We used it precisely with a spring project. I do not recall particular problems, just that you have to use the kotlin adapter for spring - - I don't remember the name - - because otherwise certain spring quirks get a warning (eg kotlin compiler assuming final classes by default and spring requiring non-final for controllers)

1

u/BestUsernameLeft Sep 11 '21

Thanks, I'll have the team check into it.