Hacker News new | past | comments | ask | show | jobs | submit login

> Java has had tools to deal with nulls for a long time, we tend to assume everything is non-null unless annotated with `@Nullable` and let tools check correct usage at compile time...

Oh yeah, nothing like creating Frankenstein's monster instead of using a tool that was designed for the purpose. And no, it's not the same. You'll never beat Kotlin compiler , no matter how many annotation you use - you will always miss something.

> data classes are very similar to Java 16's records.

You mean Java 16's records are similar to data classes, since those were first.

> Type-inference since Java introduced `var` is pretty much on-par with Kotlin.

Not even close. Can't use it outside of functions, clunky final var instead of val.

> Some people have already started talking seriously about Kotlin now just adding friction, as you need to keep updating its version and the Gradle plugin (which is not compatible with some versions of Gradle if you're stuck with some old Gradle plugins).

My favorite kind of people. 'Some'.

> Java 17 should probably stabilize sealed classes, which is one of the biggest advantages of Kotlin at the moment...

Nice!

Let's wait until you'll upgrade to Java 17 while Kotlin has everything already and much more with compilation to JS and native in the future.




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

Search: