Regarding KMM direct interoperability with swift. ...
# language-proposals
d
Regarding KMM direct interoperability with swift. I've read the recent update stating it's on hold due to limited resources. Does this usually means it will just happen later or it will be probably dropped? Was really hoping for this one :-) https://youtrack.jetbrains.com/issue/KT-49521
j
I feel with the research which they state in the issue it is still top of mind but with everything going on with the new memory system in native and the K2 compiler work that all resources are spent. Swift is the main language on Apple devices and multiplatform with those devices seem to be one of the core advertised use cases of Kotlin Multiplatform. There is already quite some work done to support Objective C. I personally am not worried that it will never be developed (it is even on the roadmap), but the only question is when. And my personal guess is that it will be one of the most important things after the new memory system and K2 compiler work. Just imagine a kotlin native which could run Jetpack Compose and could directly integrate with Swift Combine and SwiftUI for some native views. Or where you could trigger Kotlin code from swift code without objective c bridging. That would be a dream multiplatform experience integrating with the native platform dev constructs as a fallback without complex bridging. But as I am an outside watcher I am only making an educated guess.
d
I think i would be happy just with first class support for code and coroutines between kotlin and swift. We could write all the domain layer in Kotlin and a good chunk of repositories and share it between the platforms. (Flow included) I know you can "kinda" do it with objective c but it's not the same thing. You can't expose coroutines. You have limitations on how to build objects for models... It just doesn't feel native :-)
Roadmap was updated, and swift interoperability completely removed. Sad news.
j
As stated in the issue, there is a shortage of resources for the next releases. It seems they want to focus on the above mentioned other priorities like K2 compiler, new garbage collector etc. I still have no doubt swift interoperability will come at some moment but now likely not within the next 2 years… But I have to agree with the planners, that K2 compiler and garbage collector are more important since they expand language capabilities the most at this moment for multiplatform developments.