4 ms·
The difference is that Kotlin has first class support on Android. Aside from that I agree, Kotlin is obviously second class on iOS. IMHO for simple multi-platfo
by aikah 8y ago
The difference is that Kotlin has first class support on Android. Aside from that I agree, Kotlin is obviously second class on iOS. IMHO for simple multi-platform projects I'd use either plain webtechs or react-native. The impedance mismatch between Kotlin and Swift/ObjC is going to be an hindrance no matter what.
- pjmlp 8y agoJavaScript is also an impedance mismatch.
- aikah 8y ago> JavaScript is also an impedance mismatch. Yet both Android and iOS allow embedding a Javascript engine in an native application with no effort whatsoever.
- pjmlp 8y agoI wouldn't call manually exporting Java methods to the WebWidget "no effort whatsover", plus the performance hit of doing cross-language, inter-process calls, in a dynamic language while the platform languages are static.
- aikah 8y ago> I wouldn't call manually exporting Java methods to the WebWidget "no effort whatsover", plus the performance hit of doing cross-language, inter-process calls, in a dynamic language while the platform languages are static. Well like it or not JS is first class on both platforms as they both have a JS engine at the developer's disposal, Kotlin or C# aren't.
- pjmlp 8y agoI don't know about iOS, but on Android it surely isn't first class, the development experience is even worse than using the NDK. If it was first class, there would be official Android APIs for JavaScript, debugging support on Android Studio, project templates on Android Studio. Instead it is a web widget with its own little island of HTML 5/CSS 3, hardly first class. The support is not much different than getting chromium and compiling it with the NDK. The only mobile platforms where JavaScript is first class, alongside the other platform languages is on ChromeOS and UWP.
- aikah 8y agoFirst class because there is no need to deploy your own JS engine on both these platforms, you can argue all you want, both have a webview/js engine API that are part of their respective SDK.
- pjmlp 8y agoThat is not what first class means. A language is first class when the complete SDK stack tooling has support for it. IDE, debugger, docs, project templates, profiler, OS APIs.
- aikah 8y ago> That is not what first class means. That's not what first class means to you. You can't just make up the definition you want just because it's convenient for your. First class means it runs on the platform without any form of external or third party runtime.
- pjmlp 8y agoThe point is that you want JavaScript to be seen as first class no matter what, because it fits the React Native story, even though it requires manually written FFI for the platform APIs. Hey, by your definition even web pages are first class on mobile devices, as they don't require any form of external or third party runtime, maybe we can even call them native apps! If JavaScript doesn't require any form of external or third party runtime, then why does React Native bundle JavaScriptCore?!? https://github.com/react-community/jsc-android-buildscripts https://github.com/react-community/jsc-android-buildscripts