Hacker News new | ask | show | jobs
by Casperin 1297 days ago
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.
2 comments

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!