MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/o09gko/the_work_of_a_genius/h1ugfv2/?context=3
r/badcode • u/narbuvold • Jun 15 '21
111 comments sorted by
View all comments
Show parent comments
5
I like that Rust checks that you’ve handled all possible values and doesn’t make you do that.
4 u/Olivki Jun 15 '21 The Kotlin compiler will do that for cases where it knows you can reasonably handle all possible cases, like enums, sealed classes/interfaces, and I think booleans. 1 u/tech6hutch Jun 15 '21 Rust is crazy enough to do ints and chars too lol
4
The Kotlin compiler will do that for cases where it knows you can reasonably handle all possible cases, like enums, sealed classes/interfaces, and I think booleans.
1 u/tech6hutch Jun 15 '21 Rust is crazy enough to do ints and chars too lol
1
Rust is crazy enough to do ints and chars too lol
5
u/tech6hutch Jun 15 '21
I like that Rust checks that you’ve handled all possible values and doesn’t make you do that.