3 ms·
It is relatively easy to produce NDK outputs from Swift : https://github.com/swift-cc/tools https://github.com/swift-cc/tools That's not very useful though. NDK
by on_and_off 11y ago
It is relatively easy to produce NDK outputs from Swift : https://github.com/swift-cc/tools https://github.com/swift-cc/tools
That's not very useful though. NDK is by design very limited and can't interact with almost any of the platform APIs
The Android framework team could theoretically make the necessary work to allow Swift code to :
-dialog with the framework APIs (so we would need need some kind of API bridge)
-compile to oat or bytecode format so that it can be read by ART (the vm used by android).
They would have to throw away and restart from scratch a lot fo the tooling though.
The Android frameworks team discussed the adoption of a new language during the fireside chat of the android dev summit.
The language in question was Kotlin (which would IMO a much bigger contender as the next language for Android). Their response was that adopting a new language means a massive amount of work for them and some very hard questions to answer like 'what about the people that still need/want to write in Java ?'.
Adopting Kotlin is not in their plans right now (it might change if in 2 years 90 % of the devs write their apps in Kotlin), especially since Kotlin already outputs bytecode, so it is 100 % compatible with the java APIs of Android.
This is even far less likely to happen with Swift :
-Apple controls the future of the language, Google can only lose from such a relationship.
-It is not compatible with the java APIs.
- pjbrunet 11y ago"Apple controls the future of the language, Google can only lose from such a relationship." I didn't think of that, but makes perfect sense. I haven't heard of Kotlin, thanks for sharing. Personally, I think the "massive amount of work" would be worth it, considering they can afford to hire more developers. If you ask me, anything would be better than this weird Eclipse plugin concept, not very sexy. Granted, I have not researched it more than a few hours, but if "Hello World" requires a certain bloated IDE and multiple pages of code, I want nothing to do with that. I did find DroidScript and that looks like fun, but I haven't tried it yet. Strictly from a marketing perspective, the name "Swift" just sounds easy and intuitive, which is maybe the opposite of Java's reputation at this point.
- on_and_off 11y ago>weird Eclipse plugin That's the standard to add new languages to Eclipse, nothing weird with that. The Eclipse plugin has been deprecated for a long time though, and Android Studio (based on IntelliJ) is the official IDE of the platform.