I have written this piece to describe the benefits...
# feed
m
I have written this piece to describe the benefits I felt using Kotlin over Java. I have created Android Apps and Backend Services using Kotlin. Let me know if you have had similar experience switching to Kotlin. Also this link is free to open and read! https://levelup.gitconnected.com/benefits-of-kotlin-over-java-backend-and-android-1aa61eaad337?source=friends_link&sk=e8769bfaf2bb7b009fe6607d084e9238
s
I totally agree with your top three: • nullability, • sealed classes, • and immutability (well, at least it feels like it, technically you could have a getter returning changing values, but close enough for unnecessary mutable variables to feel dirty) Lateinit is really only solving a problem that Java with it's mutable variables and always nullable types doesn't even have 😂 only two big things that come to my mind: • extension methods and • inline functions with reified type parameter! (I'm Kotlin/JVM-only for now.)
honourable mention: the new (Kotlin1.4) trailing comma in parameter lists 😆
m
That’s a nice summary!