The switch statement doesn't work with any object thoug let alone expressions (wich do work on kotlins "when"). It just accepts basic types, String and Enum - at least in the version available on Android. I used java on android for many years privately (and on github) and since kotlin came out I have never looked back. It's pretty amazing that Kotlin is bytecode compatible with the old jvm used in android and yet has so many advanced features. I freakin love it!
View all comments
Show parent comment
1
u/OrganicNectarine Sep 19 '18
The switch statement doesn't work with any object thoug let alone expressions (wich do work on kotlins "when"). It just accepts basic types, String and Enum - at least in the version available on Android. I used java on android for many years privately (and on github) and since kotlin came out I have never looked back. It's pretty amazing that Kotlin is bytecode compatible with the old jvm used in android and yet has so many advanced features. I freakin love it!