Google is reportedly considering making Swift, the object-oriented language developed by Apple, a "first-class" language for Android. Swift, which Apple made open source late last year, would apparently not be meant to replace the current first-class language, Java, at least not in the short term.
From The Next Web:
Google's Android operating system currently supports Java as its first-class language, and sources say Swift is not meant to replace Java, at least initially. While the ongoing litigation with Oracle is likely cause for concern, sources say Google considers Swift to have a broader "upside" than Java.
As noted by The Next Web, there would need to be substantial work involved in making Swift a first-class language for Android. For one, Android's standard library would need to be made Swift-compatible, and Android would need a Swift runtime.
Google is also reportedly considering another language, Kotlin, as a first-class language. However, there are said to be concerns that Kotlin compiles too slowly.
Reader comments
Google may make Apple's Swift a 'first class' language on Android
Why not just use C# in Visual Studio with Xamarin and call it a day. All these obscure single platform languages are undermining the open source of android
C# is also single platform since it only compiles on windows. what about Linux and Mac?
Xamarin actually uses Mono, which is an open source .NET implementation.
I don't do C#, but isn't this a compiler for C# for Linux & Mac?
http://www.mono-project.com/docs/about-mono/languages/csharp/
http://www.mono-project.com/download/
I have used Xamarin for C# development on my Mac.
.NET is (or at least used to be) Windows only. C# is a language. It can be implemented on whatever it wants. Google uses Java but does not use (or at least not openly... legal cases pending) Sun Java, which is what people mean when they say 'Java'.
That would be Oracle Java now, but I think Google now claims to be using OpenJDK which is the reference implementation of Java. They will no longer be claiming to use Apache Harmony.
Google obviously wants development to happen on all platforms; not just Windows. We could build the same tool as Xamarin for Swift, but it wouldn't change the fact that the final product would include another runtime. A native first-class runtime that ran compiled Swift or Kotlin would free Google from any future quarrels with Oracle – not that I know much about the politics behind that case.
I don't know a ton about the insides of Xamarin, but I would guess it still has to talk to the Java APIs in order to deal with UI. That's yet another hurdle which would be resolved by Google making Swift/Kotlin a supported language.
On the plus side, switching from java even developers could uninstall oracles giant security flaw they call an environment
Posted via the Android Central App
Except the jvm is not a giant security flaw. Nice try though. If you are referring to the java browser plugin, then yes. But that is more or less gone.
Mehhh. I wrote my first iOS app in C# using Xamarin in hopes of making it easy to build an Android app running the same code, but it turns out that if 80% of your code is UI based or based on specific controls offered by each platform, you can't reuse that much code anyways. I built my next app in Objective-C and have to say that it was MUCH easier if only because of the fact that there is more example code out there and I can look at Apple's documentation and examples and know how to do something without first figuring out how to write that code in a different language. Not to mention, using Xamarin adds another layer where things can go wrong. There was a nasty Xamarin bug last year that caused some Xamarin apps to not run on iOS 9. I had to update my app and do a bunch of extra work that I wouldn't have had to do if I had just used Objective-C for that app.
That's usually the case with those cross compile layers. One more thing where something can go wrong, or some feature can't be accessed, or some update broke the native layer it tries to talk to, etc. Over the years, things like Xamarin promise the holy grail of one environment and end up causing more grief than benefit.
Because bloated runtimes that give Microsoft a free pass are not wanted
GTFO. Dude your obviously not a developer and if you were probably not a very good one. There are about 10 other multi platform languages where the standard is not set by Microsoft that would be a better choice.
Swift is a lower level language than Java (despite being more expressive in syntax).
This leads to higher predictability of execution (less lags) and higher performance (not that easy in fact, needs special approach to achieve this).
C# is essentialy the same level with Java.
Noooooooo!!!
Posted via Nexus 6 running on any data plan I want
Why? Swift is actually pretty awesome.
Posted via the Android Central App
Google again acknowledges Apple has the better experience at creating simplified and easy software.
Posted via the Android Central App
you do know the difference between software and development languages, right?
This isn't about iOS and Android (ahem... apps crash 3x more on iOS), it's about actual programming languages. Google has been rumored to be looking for an alternative to java for some time. Adopting swift would be a smart move since it'll create a seamless transition for cross platform development.
Now... how is this in ANY way related to software?
And this will be the same nightmare as Java right now if they trust Apple... Never trust a competitor... Or at least it's correctly written everywhere and 100% sure for the future (never trust 99.9%)... Never make the same mistake as Java... Enough!!
Posted via the Android Central App
Java isn't open source.
"you do know the difference between software and development languages, right?"
That's a huge assumption with this dim bulb.
Commenters again acknowledge that they are end users and not developers.
Your microwave has code written in assembly that makes it easy to press the popcorn button. Development tools have very little to do with the final product.
I don't understand my popcorn button but I do understand from this article that android is swiftly transitioning to iOS. Do I download my monthly security updates now my hooking up my usb cable to my computer and hitting 'sync' in iTunes?
"I do understand from this article that android is swiftly transitioning to iOS"
There's nothing I can say that you'll understand based on this assumption. Go ahead and dig out your cable and be ready.
Tell me you got that it was a joke post, right?
Posted via the Android Central App
Nope. Reading comments on Mobile Nations sites has made me always assume the worst. :)
It really didn't come across as a joke. And with the low intellect comments prevalent on the internet these days, you have to assume the worst.
I dunno man, I was kinda conflicted whether to retain my faith in humanity and take it as a joke.
Posted via the Android Central App
Uh-oh, google won't let me install iTunes on my chromebook. Please address this in your next chromebook article.
Even if what you said had anything remotely to do with this article, your actions would still be deemed silly as not even iOS users have to hook anything up to iTunes unless they chose to do so. But then again, all of this has nothing to do with Google considering using Swift as first class programming language.
For the umpteenth time, Jerry provides my first out-loud laugh of the day.
I'm still kind of bummed about Swift's existence. It took me a couple years to get really proficient and comfortable with Objective-C, and then they go and release Swift. I know you don't have to use it, but most new coding examples for new APIs and features are now in Swift, so I have to look at them and sort of translate how that should look in Objective-C. And honestly, Swift just looks so much different than every other language that it just irks me that it's not obvious. But since I also develop for Android, if they do adopt Swift, I suppose it could help me being able to develop in the same language for both platforms in the future.
And before you trash on me for not learning Swift by this point, it's not just because I don't want to learn it. It's also because the apps I build are for enterprise and have to support all the way back to iOS 6 (nightmare), and if your app supports iOS 6 it cannot contain any Swift code, so I haven't really had the opportunity to use it yet. When iOS 10 is released and we drop support for 6, I think I'll finally be able to start using it.
Actually, Swift only works for iOS 8+, so if you still need to develop for iOS 7, Swift is out of question
This is how it starts :P You sound like me years ago when transitioning from C to C++ lol.
Advice from someone who went through that and was pushed into something I wasn't comfortable and didn't really want to learn — convince your employer to send you to one of those quick-fire week long learning center deals. You won't learn a lot, but you'll take what you get there and find a way to make the move easier for you.
Or you could do what I did and say fuckit, and get better with Perl and Python. Let the new guys have a turn while you stay in the basement in front of a bank of CRTs and dirty second hand keyboards. It's quiet down there, and nobody really knows what you're doing — but they are afraid of what might happen when you stop. :P
'stay in the basement in front of a bank of CRTs and dirty second hand keyboards. It's quiet down there, and nobody really knows what you're doing — but they are afraid of what might happen when you stop.'
I've got laugh tears running down my face and my wife is yelling, "are you ok" from the other room.
I also went to Swift from Objective-C. You know, Objective-C was not created by the human, only drunk aliens can produce such mess. No matter how long you learn it, it still doesn't work. Swift on the other hand, was very easy to learn and adopt.
Now I cannot look into my Obj-C code!
As about Swift for Android. Unless it will be better than Java syntax it is useless.
I am more .NET C# developer rather than Android/iOs, so for me anything like C# better. C# and Java mostly look the same, that I cannot say about Obj-C and even Swift.
One simple example of Swift strange behavior,
if a!= b //won't compile - error
if a !=b //won't compile - error
if a != b //now we are okay :)
I actually think that's a good thing, because it fixes those god awful lines of code of people that cannot separate elements. I hate reading code where people refuse to space things out. That's partially why I love Python, it forces people to indent properly, which I see a lot of people not doing, making my reading experience quite sub-par
"And honestly, Swift just looks so much different than every other language that it just irks me that it's not obvious."
Really? I've just started learning it for work and so far it doesn't seem that dissimilar to other languages. It mostly reminds me of other C inspired languages (C#, Java etc) and takes bits of Javascript along as well.
Its a little different, but every language is. Its not like its Python or anything!
Meh, I'm not enthusiastic for Swift probably because I hate XCode for sooo many reasons.
But fuckit, just another nice option. My interests still demand C/C++ so NDK for me :D
JetBrains have added Swift support to AppCode. Is it working great yet? No, but it'll get better. Android Studio wasn't great at first, and that was using existing languages. Swift is only a couple years old, now that its open source we'll get better IDEs for it as companies like JetBrains try to meet the demand.
I think this s gonna be the best move by Google... I saw somebody mentioning xamarin that is a wrong way to go Microsoft wants to control everything avoid xamarin as much as you can
Posted via the Android Central App
Actually i don't care what language i use, for me all languages are similar.
Not cool, I was hoping for C#
I really love Kotlin!
*disclaimer* I use and have developed for both platforms.
As Phil has said on the podcast many times, development is hard. If Google is seriously considering a shift to swift, I see this as a good thing, if only it's 1 language to learn for native programming. I don't steel earning swift as any harder to learning Java (I relearned Java to do apps having been a web developer for 10+ years since university) No it won't mean a single code base for all your apps and Yes I will probably have to rewrite 95% of my UI code, or anything interacting with local storage (local storage database engines differ). But the underlying APIs, the nuts and bolts of the app, may be able to be written once. This will mean a lot more shared libraries written by me or the company I work for.
Hopefully with these libraries being able to be reused we will not have to resort to cross-compilers of dubious quality as clients can't afford the cost of the time to natively write 2 apps to cover iOS and Android. Not everyone is like mobile nations and hugely invested in multiple platforms. They have a certain (usually too small) budget and need to cover both platforms. Mobile Nations suite of apps such as iMore on android vs iOS have different feature sets. I don't know for certain but I bet you because Phil and Rene care about their respective audiences that both apps were written natively, as both apps appear to offer the best of both platforms to users. I digress and now sound like a suck up, but hey ho...
I'm looking forward to it. As an automation tester, I'd prefer to reduce context switching as much as possible. If I come into a place with no automation tests, I can do what I want, and its fine. But some jobs I'll come in and because I have to write the tests for the Android, iOS and web platforms, and they're all written natively, and the teams have agreed that the tests should be written in the matching languages so that developers can contribute, then I end up having to spend my days jumping between Ruby, Swift and C#. Trying to remember the syntax for similar functionality across 3 languages gets exhausting....
Sounds like a good move to me. Anything to make abandoned apps to disappear from the play store
Posted via the Android Central App
Sounds like a great idea to me. It will probably increase the number of cross platform apps quite a bit, since more of the code is compatible and a developer would only have to know Swift.
I hope this is not true.
Why not Go?
I'm definitely a general consumer which I realized after reading this thread. I don't understand a bit of it but would love to learn just for the sake of understanding at the least.
Posted via the Android Central App
Seems like golang would be a better/more natural option. However, Swift might make cross platform development easier... I doubt it though, Apple won't bend in any way.
Does this mean Android will be (unofficially) able to run IOS apps? Or at least easier to port?
Posted via the Android Central App