I was just sitting over here writing up a proposal to add Rust-like Enums to kotlin, when I had to look up what switch
was called in kotlin, cause I knew it was different. I saw the sealed classes entry on the website and thought “I never did look into those…” Well lo and behold, they are almost exactly Rust enums!
The enums and pattern matching were the one thing I missed from Rust, and as it turns out, Kotlin has everything.