News for hackers. Stuff that matters.
Re:Can I get some reasons to use Java instead of Kotlin? by blacktriangle on Monday May 17, 2021 @11:19AM (#27184431)
I don't think the CoffeeScript comparison is fair. Kotlin fixes some major Java problems (NPEs and checked exceptions), CoffeeScript was almost purely sugar over JS semantics.
Re:Can I get some reasons to use Java instead of Kotlin? by _old_dude_ on Monday May 17, 2021 @12:48PM (#27185506)
I never get why people have trouble with NPE.

If you stick to two rules, you're out of misery

  - never store null in a field, a collection, etc
  - checks all parameters that are not nullable (most of them) with Objects.requireNonNull
    (it's what Kotlin does automatically BTW)
Re:Can I get some reasons to use Java instead of Kotlin? by kevinmgranger on Monday May 17, 2021 @12:50PM (#27185521)
This boils down to "just don't make mistakes."
Re:Can I get some reasons to use Java instead of Kotlin? by _old_dude_ on Monday May 17, 2021 @01:10PM (#27185719)
You still have PEBKAC but it's easy to find because a null can not cross the method boundary, so no snowball effect.
Re:Can I get some reasons to use Java instead of Kotlin? by nindalf on Monday May 17, 2021 @04:03PM (#27187751)
"There are no bad languages, only bad programmers"
Re:Can I get some reasons to use Java instead of Kotlin? by imtringued on Tuesday May 18, 2021 @03:22AM (#27192042)
>checks all parameters that are not nullable (most of them) with Objects.requireNonNull

I would go as far as say 95% of them are. So now your code is filled with effectively pointless checks (you run into an error at runtime instead of compile time) if your language had non nullable variables in the first place.