I wonder what is the advantage of using Kotlin nat...
# kotlin-native
a
I wonder what is the advantage of using Kotlin native over React Native ?
o
I’d say: using Kotlin, better platfrom integration (ability to interop with arbitrary platfrom APIs), actual native code generation (so no VM), having Kotlin MPP as discipline of cross-platfrom development
a
is the performance better than React native?
o
depends on the workload. on some workloads it could be on par with C, some heavy object oriented benchmarks may suffer, but generally yes.
❤️ 1
👍 1
s
React Native is a JavaScript framework for mobile and Kotlin is just a language. The better question is what is the advantage of programming in Kotlin over JavaScript. The answer becomes a lot more obvious at that point. As far as whether the benefits of adopting the React framework outweigh having to use JavaScript, I would say that answer is a bit less clear. AirBnB had a series of detailed blog posts about their experiences and why they are no longer going to proceed with it. Some points may apply to using Kotlin on iOS most don’t.
👏 1
a
We're building games, so, the performance is important. Plus, a lot of our code is already in native Android, so, easier to convert to Kotlin Native to add platforms.
👍 1
r
The question is comparing apples and oranges. React Native and Kotlin Native use the word “native” to mean two different things. React Native is “React using native mobile widgets”. Kotlin Native is “Kotlin compiled to native instead of jvm bytecode”. They both can facilitate cross-platform code-sharing but they’re ultimately doing completely different things.
👍 1
a
we could share business logic code and there is a library for sqlite in KN "Knarc.db", what about a network library in kotlin native so can share more code between android and ios?
is there anyone was able to port volley lib or retrofit lib to ios in KN?
r
👍 1
❤️ 1
a
Awesome 👏