5 ms·
Swift on Android?
- noamsml 11y agoI wonder if, given the giant set of existing Android libraries written in Java, they'd need to create a swift <-> java FFI.
- jayd16 11y agoMaybe we'll get JSwift running on the jvm so we can just import anything that compiles to bytecode.
- thedevil 11y agoThis 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-swift/ http://thenextweb.com/dd/2016/04/07/google-facebook-uber-swi... 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.
- firlefans 11y agoThis article (which contains nothing but speculation) has been posted here already at least once.
- s_dev 11y ago"Hello, world" on Android: https://github.com/apple/swift/blob/master/docs/Android.md https://github.com/apple/swift/blob/master/docs/Android.md
- shrewduser 11y agomore likely a move to kotlin or C# than swift imo.
- CameronBanga 11y agoThis story is 3 weeks old, was there a new update to this?
- on_and_off 11y agonope
- 0x0 11y agoSome 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).
- transfire 11y agoI find this very hard to believe. One would expect Google to adopt Go, or perhaps Dart, since they were developed by Google.
- clumsysmurf 11y agoBruce Miller, an Engineer at Google, answers this here: https://www.quora.com/Why-wouldnt-Google-use-Go-instead-of-Java https://www.quora.com/Why-wouldnt-Google-use-Go-instead-of-J...
- freyr 11y agoDespite 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 11y agoGo 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 11y ago> 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
- guelo 11y agoThis 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 11y agoThe 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 11y agoIf somebody figures out how to compile Swift to JVM or Dalvik byte code then I'll believe it's happening.
- nostrademons 11y agoI think it's more likely that Google will support Swift on NDK. That's quite doable - there are already many other languages (C, C++, Rust, Haskell, Python) that will work on Android via NDK. And Swift is LLVM-based, just like the existing C++ and Rust toolchains. If you've ever done NDK programming, you'll know that this brings with it it's own set of hassles; it's not at all like writing Android apps in Java. But it could be quite useful for companies who have "headless" business logic that they want to share between iOS and Android.