r/androiddev • • Sep 16 '18

Why does Android development feel like hell?

[deleted] — view deleted post

209 Upvotes

174 comments sorted by

View all comments

Show parent comment

0

u/PurpleIcy Sep 17 '18 edited Sep 17 '18

I see, I'll check it out, thanks.

By the way, you'd instead use switch() for the second one in other languages, or when they don't have it - hash tables, e.g. python, by making use of .get() method on dictionary which will either return the match or default value, and this behaviour is identical to switch. But I get the point.

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!

1

u/PurpleIcy Sep 20 '18

String is an object in most programming languages as far as I am concerned...