Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Only problem is all the GUI libraries that won't be cross-platform. It won't be anything close to build and run on both. But at least third-party libraries that don't have anything to do with GUI will work on both.
 
  • Like
Reactions: HiRez and kdarling
Only problem is all the GUI libraries that won't be cross-platform. It won't be anything close to build and run on both. But at least third-party libraries that don't have anything to do with GUI will work on both.

That is true but it will still make things a lot easier.

Most developers code with MVC in mind, so the code that does all the processing, data handling etc is separate from the UI. And that logic is usually the hardest part when working with different languages and libraries.
 
Adding Swift support to Android won't be *that* hard technologically for Google such that it needs to take *years*. Remember that there were two projects that had decent results in bringing Objective-C to Android (StellaSDK and AppPortable).

In short, if a language has a compiler for Linux, there's a pretty good chance Android can support it.
 
I wouldn't call Swift easy to learn. It's easier to start learning than Objective-C, but it gets complex pretty fast. There are lots of nuances that Objective-C and even Java don't have.

I like Swift a lot, but I actually think it could be a bit simpler.

This was my concern, initially, too - still is to some extent. But the trend for a while - accelerating recently - is for language changes that reduce the complexity.

E.g. one area I was worried about was the rules for labeling of function arguments. So. Inconsistent. I mean I could follow the rationale - but it added up to a mess! They've really cleaned that up for v3 now.

Have a look on the Swift Evolution list. Many (perhaps half) of the proposals are about simplifications - and a lot of them are being accepted in.

I think we're moving from the original phase where the language was being defined in a closed room - to the broad adoption phase - while still changing rapidly.

But, at the end of the day, many of those complexities are rules you need to learn once - but once you know them they can simplify the everyday tasks of writing software.
[doublepost=1460111421][/doublepost]
I'm a python developer by trade but Swift seems to be the way forward for mobile apps at least. I wonder if the quant finance world will ever move in this direction... Is there a numpy equivalent for Swift?

I work on a Quant team. It's all C++ at the moment (although I'm working in some F# around the edges).
But I've been toying with the idea of proposing some Swift! Most of our critical third-party libraries are actually C libraries anyway - which Swift can inter-operate with quite nicely (although I've not tried that one Windows).

In the end I doubt it, though. I've got my eye more on the C++ pipeline -which is getting pretty good too (C++17 and beyond) - although it will never be as clean and uncluttered as a brand new language.
[doublepost=1460111549][/doublepost]
Xamarin lets you write in C# (much nicer language than obj-C or swift IMO) and deploy to all platforms. It's really nice.

I quite like C#, although I prefer F#. I can see you preferring C# over Objective-C (although not all would agree), but, personally, I prefer Swift over C#. They each have their strengths and weaknesses but I think Swift has more potential at this point. In many ways it is closer to F# (although doesn't go far enough on the functional side, IMHO).

What do you prefer in C# over Swift?
 
This was my concern, initially, too - still is to some extent. But the trend for a while - accelerating recently - is for language changes that reduce the complexity.
Thats good to know, I read a book on swift 1.0 and played about with it then but never got around to creating a full app.
 



swift.png
Google is considering making Apple's Swift programming language a "first class" language for Android, reports The Next Web. Executives from Google, Facebook, and Uber reportedly attended a meeting to discuss Swift in December, around the time that Apple officially made Swift an open source language.As outlined by The Next Web, adopting Swift would be a major undertaking for Google, due to the need to create a runtime for Swift and incorporate it into APIs and SDKs, many of which would need to be rewritten, but it is something that Google could do. A Swift-based Android operating system would be a boon for developers, who could create native apps for both platforms. Swift is a well-liked programming language because it's simple to learn, easy to work with, and fast.

Along with Google, Facebook and Uber are also said to be considering making Swift "more central" to their operations. At Facebook, employees are already working with Swift internally, though how deeply remains in question, and at Uber, it is not clear if work on a transition to Swift has begun.

Switching over to Swift would be a long process for Google that could span multiple months or years due to the need to rewrite Android services, apps, and APIs, so it is not likely to be adopted in the near future, and Android support is integral, says The Next Web, for the deep integration that Facebook and Uber want to adopt.

Apple first announced Swift in June of 2014 and expanded on it with Swift 2 in June of 2015. In December, the programming language was made open source.

Article Link: Apple's Swift Programming Language May Be Adopted by Google for Android
 
I quite like C#, although I prefer F#. I can see you preferring C# over Objective-C (although not all would agree), but, personally, I prefer Swift over C#. They each have their strengths and weaknesses but I think Swift has more potential at this point. In many ways it is closer to F# (although doesn't go far enough on the functional side, IMHO).

I like F# too, and of course it has had quite a head start over Swift. Trouble is I don't see Microsoft (or anyone else) really pushing it the way Apple are pushing Swift. The main issue with Swift at the moment for me, is the lack of libraries/frameworks, particularly for scientific computing and numerics. For now it would be good if the C++ compatibility could be improved, rather than having to use these rather cumbersome bridging headers.
 
I can't imagine why Google would choose Swift. Swift contains a lot of language constructs to make it interoperable with Objective C, which would be totally useless for Java. This in contrast with f.e. Jetbrains' Kotlin (https://kotlinlang.org/) which is designed to work with Java. Google already uses the Jetbrains IDE as the basis for Android Studio, so they wouldn't have to create a new language plugin for their IDE.
 
Once it becomes more stable, I expect Swift to see some significant adoption. Python is great because it's fast to write, but Python applications (since they are interpreted) may be highly unstable and significantly slower than a compiled application. People said it didn't matter on a practically-unlimited-power server; they were wrong. The ability of web applications to scale is becoming more and more important, and Swift gives you more bang per buck.

Python is just a language - it is not an implementation. It doesn't have to be interpreted by the CPython interpreter (the most common way of running Python code) - you could use another tool to interpret or compile it. Cython is a tool that converts Python code to C code, then compiles it to native code, for example. Jython compiles Python code into jar files that can be run in a JVM. Pypy is a Python interpreter written in Python - my understanding is it runs about twice as fast as the standard CPython interpreter.
 
Google initially used Webkit to ideate Chrome till it got popular and then dropped it later for new Blink engine. They may do the same with Swift. They don't have culture.
They used webkit for 5 years...and have been on blink going on 3. And blink is a fork of webkit. They could do the same to swift, but it is a much different situation because it would mean breaking all the code for a lot of third party devs, changing a browser rendering engine doesn't require every web dev to rewrite all their javascript code.
 
  • Like
Reactions: Madd the Sane
I can't imagine why Google would choose Swift.

Being able to use the same language for both iOS and Android development would be a huge advantage for App developers. Plus, Google doesn't really care how many iDevices Apple sells as long as the users still use Google services (which are attractive to those of us not operating in an all-Apple world) - Android is just their insurance policy against Apple or MS locking them out.

which would be totally useless for Java

As I understand it, the Oracle dispute is over Google's re-implementation of the Java APIs & runtime, not the programming language itself. Google may want/need to phase out everything to do with Java.
 
  • Like
Reactions: jamesrick80
This would be fantastic for everyone.

Google wins, because it's not longer using an outdating language (Java 6), and because it's now even easier for developers to create a single, native app across ecosystems, boosting the value of their platform.

Apple wins as Swift becomes more popular, creating better tools and apps for both OS X and iOS.

Developers win, as cross platform support becomes easier than ever.

And most importantly, consumers win with better apps and support across whatever ecosystem they choose.

Props to Apple for open sourcing Swift, and props to Google (assuming this does indeed happen) for adopting it.
 
It's possible that Google could accomplish this fairly quickly by compiling Swift for the JVM. There are already rumors that they are switching to the Oracle JDK, which already supports multiple languages. By compiling Swift to Java bytecode, they could easily support both languages in parallel, and probably offer some decent interoperability as well.
 
A serious question for all you guys.

I want to start coding for hobbies sake. Where should I start? Any pointers?
 
I quite like C#, although I prefer F#. I can see you preferring C# over Objective-C (although not all would agree), but, personally, I prefer Swift over C#. They each have their strengths and weaknesses but I think Swift has more potential at this point. In many ways it is closer to F# (although doesn't go far enough on the functional side, IMHO).

What do you prefer in C# over Swift?

Well, mainly I like that C# is syntactically similarly to Java/C++/C, etc. Swift is syntactically similar to Objective-C which has smalltalk syntax, and that has always been a huge barrier to me.

The other part is practical - I work day in and day out in Java and C++ on linux and C# on windows. When we dabble in mobile projects, Xamarin is a natural fit, and works exceedingly well.
[doublepost=1460150387][/doublepost]
Android uses Java.....? No wonder it's so laggy.

Android uses the Java language, however I do believe that nowadays it is compiled to native rather rather than using bytecode runtime. Earlier versions of Android (prior to 4) I believe still used bytecode runtime, and then they experimented with JIT before going pure native compilation.

I might be off in the timeline, but I do believe that is where they currently stand. I'm not an expert on Android programming though.
 
I want to start coding for hobbies sake. Where should I start? Any pointers?

What sort of things are you interested in coding?

Ultimately, for iOS or OS X apps (and maybe Android in the future...) you'll want to learn Swift, for web/browser-based applications you'd want JavaScript (ECMAScript). There's no particular reason why you shouldn't start straight off with either, but it might be worth starting with something like Python (don't like it personally, but it is solid, versatile, cross-platform, lots of support for beginners and a bit more straightforward than Swift). Swift could probably do with another year to evolve and stabilise before becoming ideal for beginners (...and ECMAScript 6 is starting to appear, which could make JavaScript much nicer to use...)

ProTips: there's a huge conceptual leap from learning basic coding skills & writing simple programs, to writing modern GUI-based, event-driven apps and finding your way around all the functionality provided by a modern OS. This is often a bigger deal than hopping between "general" languages like Swift, Python and Javascript.
 
A serious question for all you guys.

I want to start coding for hobbies sake. Where should I start? Any pointers?
I think either Python or C is the best language to start with if you want to learn it broadly. Otherwise, if you want instant action, I'd say pick up Apple's guide on building your first Swift app and "just do it". Also, be careful when asking programmers for "pointers" ;)
 
  • Like
Reactions: thekev
A serious question for all you guys.

I want to start coding for hobbies sake. Where should I start? Any pointers?
Go on iTunes U and download one of their tutorials. The Stanford University's -- Developing iOS 8 Apps with Swift, is a good intro.
 
Google considering adopting apple technology? times have changed!
Google forked Webkit, the core of Safari, to create Chrome the browser and Chrome the operating system. They take technology where they can find it and adapt it to their needs, be it reverse-engineered Java or their custom Apache webservers.
 
What sort of things are you interested in coding?

Ultimately, for iOS or OS X apps (and maybe Android in the future...) you'll want to learn Swift, for web/browser-based applications you'd want JavaScript (ECMAScript). There's no particular reason why you shouldn't start straight off with either, but it might be worth starting with something like Python (don't like it personally, but it is solid, versatile, cross-platform, lots of support for beginners and a bit more straightforward than Swift). Swift could probably do with another year to evolve and stabilise before becoming ideal for beginners (...and ECMAScript 6 is starting to appear, which could make JavaScript much nicer to use...)

ProTips: there's a huge conceptual leap from learning basic coding skills & writing simple programs, to writing modern GUI-based, event-driven apps and finding your way around all the functionality provided by a modern OS. This is often a bigger deal than hopping between "general" languages like Swift, Python and Javascript.

Thanks for a detailed reply. I am mostly planning to dabble into apps.

I think either Python or C is the best language to start with if you want to learn it broadly. Otherwise, if you want instant action, I'd say pick up Apple's guide on building your first Swift app and "just do it". Also, be careful when asking programmers for "pointers" ;)

Python seems to be the suggestion from most developer friends too. And are programmers such dangerous people? :p

Go on iTunes U and download one of their tutorials. The Stanford University's -- Developing iOS 8 Apps with Swift, is a good intro.

Thanks for the suggestion. Seems Python and swift are good for beginners. :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.