Re:Swift on Android?
by 0x0 on Tuesday April 26, 2016 @11:46AM
(#11572833)
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...)
[ Parent
| on HN ]
Re:Swift on Android?
by marvel_boy on Tuesday April 26, 2016 @12:12PM
(#11573088)
Using the same language (Swift) is a great advantage. Java has reached the retirement age, it's time for a better language.
"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
Re:Swift on Android?
by clumsysmurf on Tuesday April 26, 2016 @12:37PM
(#11573338)
Kotlin 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).
"Moving away from the jvm" means getting rid of the Android ecosystem.
That would be the smartest project management decision since the codebase of Netscape 4 was thrown away
Google created those problems in first place, by trying not to pay Sun.
Most 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.
Lots of truth here, a new language isn't going to solve things.
React Native is probably the closest that you're going to get.
I think outside NDK users,most developers aren't aware how it is constrained and full of hurdles.
You 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.