DEV Community

Discussion on: Kotlin vs. Swift: Are Android and iOS moving towards creating a universal language?

Collapse
 
tsikes profile image
tsikes

A few other points:

Both languages have a non-mobile aspect. Swift is also used for macOS development, and is available on Linux. IBM is promoting it for web server-side development. Kotlin was originally developed as a general purpose JVM language, and is also used for web server-side development.

Only Swift is compiled to native code. I realize there's a native Kotlin effort, but it's in its infancy at this point. Swift is highly competitive with C++ as far as runtime efficiency goes - and it should continue to improve.

Swift is reference counted instead of garbage collected. Kotlin is garbage collected. The practical result of this is that Swift doesn't suffer from GC latency, while Kotlin efficiently handles cycles in allocated objects. Apple (and I) both believe that GC latency is detrimental in desktop apps, games and any type of realtime programming.

I'm hopeful that both languages will continue to improve. It's unfortunate in my view that Google hasn't committed to Swift as its eventual preferred language for Android development. Swift versus Kotlin is another waste of developer mental bandwidth along the lines of Vulkan versus Metal versus Direct3D.