4 ms·
Some people seem to think that getting swift on android would solve the portability problem of apps. Don't be mistaken, if you are going for the native experien
by 0x0 11y ago
Some people seem to think that getting swift on android would solve the portability problem of apps. Don't be mistaken, if you are going for the native experience, you will still have to write your ui and io layers twice, since there won't be a UIKit or CoreFoundation on android. (And even if someone made a uikit-esque translation layer, android's activities+intents+services model is not a 1:1 mapping to uiviewcontrollers...)
- ergo14 11y agoYou still use same language (that is not java) for everything else and that can be cross platform. Also for games this should be even better since you will just draw on surface mostly- that problem is already solved by Haxe language with great success however.
- pjmlp 11y agoWhich means OpenGL, as the 2D API is a in memory framebuffer, back to the days of 8 and 16 bit programming.
- marvel_boy 11y agoUsing the same language (Swift) is a great advantage. Java has reached the retirement age, it's time for a better language.
- jmfayard 11y ago"for a better language" that interoperate seamlessly with existing java apis and codebases, and had android restrictions in mind during the design phase. Fortunately, this language already exists https://kotlinlang.org/ https://kotlinlang.org/ http://try.kotlinlang.org/ http://try.kotlinlang.org/
- clumsysmurf 11y agoKotlin doesn't solve any problems for Google from a legal perspective (for example, moving away from the Java ecosystem because of the protracted litigation from Oracle).
- Zigurd 11y agoMost such attempts run up against the particular way that a Java-like runtime is used in Android: The max heap size is tiny compared to desktop, nevermind server Java defaults. You have LOTS of instances of the runtime that depend on the Zygote and copy-on-write so as not to eat all of memory. Component lifecycle has to be handled or you will hate life. Inter-component and inter-process communication and cooperation are deeply rooted in the Android architecture. Lots of the Android OS is built in Java, and takes advantage of Android's runtime limitations and capabilities. In other words, unless you replace Java with another JVM language, you are implying a different OS, not Android with a "better" language.
- vvanders 11y agoLots of truth here, a new language isn't going to solve things. React Native is probably the closest that you're going to get.
- pjmlp 11y agoI think outside NDK users,most developers aren't aware how it is constrained and full of hurdles.