
Swift on Android? - ausjke
http://www.macrumors.com/2016/04/07/google-possibly-adopting-swift-for-android/
======
0x0
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...)

~~~
marvel_boy
Using the same language (Swift) is a great advantage. Java has reached the
retirement age, it's time for a better language.

~~~
jmfayard
"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
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).

~~~
jmfayard
"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

------
thedevil
This article is more like a comment and summary on the original article, which
was in NextWeb:

[http://thenextweb.com/dd/2016/04/07/google-facebook-uber-
swi...](http://thenextweb.com/dd/2016/04/07/google-facebook-uber-swift/)

To be fair, macrumors did give credit to NextWeb. But I still recommend the
original because it has more information and because I prefer giving credit to
the people who actually create the original content rather than the me-too
articles.

------
guelo
This is bullshit based on anonymous "Sources" of which we are not told their
credibility or how they are connected to Android or Google. Anyone that thinks
Google is going to rewrite the millions of lines of Android Java framework in
a non-JVM language just doesn't know what they're talking about. I suppose it
could be used for unmanaged native code, meaning games, but that's mostly
already cross platform via things like Unity.

~~~
bitmapbrother
The automated translation of Java source to Swift would be trivial. Google
already has a Java->Objective C translator. Once the source was automatically
translated the developers can start optimizing. The days of Java being the
only first class language on Android are numbered.

~~~
guelo
If somebody figures out how to compile Swift to JVM or Dalvik byte code then
I'll believe it's happening.

------
transfire
I find this very hard to believe. One would expect Google to adopt Go, or
perhaps Dart, since they were developed by Google.

~~~
freyr
Despite Android's market share, some developers still write for iOS first and
port to Android later (if at all). By moving to Swift, Google could reduce
this friction and help prevent Android from being a second-class citizen among
developers.

Also, Go is a great language for writing networked systems software in. But
it's not necessarily great for GUI-based application development. And there
really hasn't been much effort to change that, from the Go team or externally.

~~~
danielrhodes
Go was originally written to replace the things C++ is usually used for. There
are many other languages which work well for higher level uses. I think the
motivation behind creating Go was there weren't many new languages made to
make writing systems level software easier.

~~~
freyr
> _Go was originally written to replace the things C++ is usually used for._

Go was originally written to replace the things C++ is usually used for
_within Google_. C++ is used for many other things (embedded programming,
games and graphics engines, etc.) that it doesn't seem like the Go authors
were targeting. In fact, Pike said "we were pleased and a little surprised to
find [Go] suitable for general-purpose programming" [1]. This suggests they
weren't intending to create an across-the-board replacement of C++, since C++
is certainly a general-purpose programming language. Perhaps to a fault.

> _I think the motivation behind creating Go was there weren 't many new
> languages made to make writing systems level software easier._

The authors ran into issues describing it as a "systems language," since it's
not really a systems language in the conventional sense (i.e., low-level
language with fine-grained control over hardware and memory) [1]. Because C++
_is_ used for conventional systems programming, and the Go team described Go
as a C++ replacement, this probably ended up doing Go's reputation more harm
than good.

Pike and the Go team have essentially redefined "systems language" for their
purpose, as a language targeting servers and interconnected systems. And it
excels there.

[1]
[http://www.informit.com/articles/article.aspx?p=1623555](http://www.informit.com/articles/article.aspx?p=1623555)

[2]
[https://en.wikipedia.org/wiki/System_programming](https://en.wikipedia.org/wiki/System_programming)

------
s_dev
"Hello, world" on Android:
[https://github.com/apple/swift/blob/master/docs/Android.md](https://github.com/apple/swift/blob/master/docs/Android.md)

------
noamsml
I wonder if, given the giant set of existing Android libraries written in
Java, they'd need to create a swift <-> java FFI.

~~~
jayd16
Maybe we'll get JSwift running on the jvm so we can just import anything that
compiles to bytecode.

------
CameronBanga
This story is 3 weeks old, was there a new update to this?

~~~
on_and_off
nope

------
shrewduser
more likely a move to kotlin or C# than swift imo.

------
firlefans
This article (which contains nothing but speculation) has been posted here
already at least once.

