Hacker News new | ask | show | jobs
by bpicolo 1297 days ago
Kotlin has null safety, and there are plenty of ways to turn jvm into a binary
1 comments

It has no adts at all. Like I'm reading blog posts right now about how to do what should be the simplest thing

    enum Foo {
        A(String),
        B(i32),
    }
And it's.. not simple. And even if you manage to do it, it'll never be how Kotlin was meant to be written.
Its pretty simple:

    sealed interface Foo
    class A(val s: String): Foo
    class B(val b: Int): Foo
I agree with you 100%. It's the thing I miss most when not writing Rust. I will say that it as a feature alone isn't a good enough reason for me to write Rust, though!