Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Kotlin on iOS is statically compiled and interops with Swift/ObjC natively. Don't think KMP on iOS is even running a VM like Flutter has to with Dart?

https://kotlinlang.org/docs/native-overview.html



Dart runs natively. It only uses a VM in dev builds for hot reload.

In fact, you can even link native frameworks into your Dart code.

[1] https://dart.dev/overview#native-platform

[2] https://dart.dev/interop/c-interop


I don’t think anything runs in a vm on iOS since they don’t let you JIT compile code. Unless they’re doing pure interpretation, but I can’t imagine that being good for performance.


How solid is Kotlin on iOS?


If you mean Kotlin Multiplatform, it works pretty well. Not easy to debug, the GC is a bit weaker than the Android implementation and optimized builds can get crazy slow as the app grows. The interface uses auto-generated ObjC headers which are very verbose. Native Swift API is in beta. Overall still worth it for a commercial app, I think.


We use it in my team and it works well enough, but iOS is a bit second class citizen. Everything translates to Obj-C (NSObject at the root), so even something as simple as a data class becomes NSObjects with a cumbersome dev experience rather than a native swift enum.

We're looking forward to native swift export to go stable - it's currently experimental / beta.


Thanks.

> looking forward to native swift export to go stable - it's currently experimental

What are the timelines given for a stable release?

And when it does, what else would you say are the next big things annoying/missing in terms of devex?


Nothing certain, but I reckon it'll be a while: https://kotlinlang.org/docs/components-stability.html#stabil...

The other big problem is debugging. It's impossible to breakpoint kotlin when debugging from swift, so some bugs that are realised only from the swift client side can be tricky and time consuming to fix.


incremental native builds are getting better at least




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: