|
|
Log in / Subscribe / Register

As open source code, Apple's Swift language could take flight (ITWorld)

ITWorld reports that Apple will release its Swift programming language under an open source license. "When Swift becomes open source later this year, programmers will be able to compile Swift programs to run on Linux as well as on OS X and iOS, said Craig Federighi, Apple’s head of software engineering, during the opening keynote of Apple’s Worldwide Developers Conference Monday in San Francisco. The source code will include the Swift compiler and standard library, and community contributions will be “accepted—and encouraged,” Apple said."

to post comments

Swift for Android?

Posted Jun 8, 2015 23:47 UTC (Mon) by proski (guest, #104) [Link] (20 responses)

I don't expect Apple to release Android compatible code, but I hope it would be implemented quickly. The need to support separate codebases for two major mobile OSes is a significant entry barrier for startup companies relying on mobile apps.

Swift for Android?

Posted Jun 9, 2015 2:17 UTC (Tue) by atai (subscriber, #10977) [Link] (10 responses)

even if Swift code can run on Android, one should not expect there will be an framework that allows the same code base to run on both with good results--why would Apple help to make it easy to create applications for Android? That would defeat the purpose of Swift in the first place

Swift for Android?

Posted Jun 9, 2015 2:50 UTC (Tue) by proski (guest, #104) [Link] (7 responses)

I don't expect Apple to help. But if Swift is open source, somebody else can do it.

Swift for Android?

Posted Jun 9, 2015 9:22 UTC (Tue) by coriordan (guest, #7544) [Link] (6 responses)

Apple's strategists know how to ensure their actions benefit only them. Like Microsoft. They might involve Android or GNU/Linux etc. in their strategy, but only insofar as this somehow benefits Apple.

Swift for Android?

Posted Jun 9, 2015 10:09 UTC (Tue) by Wol (subscriber, #4433) [Link] (5 responses)

Cynical? Toi?

What you're moaning about is the NORMAL human condition. The trick is to work with it. And no, altruism is NOT an altruistic feature! It almost certainly evolved because, in pretty much all societies until very recently, people who were your physical neighbours were almost certainly also your genetic neighbours, second, third, maybe fourth cousins. You helped EVERYBODY, because the chances were high that person was a relative, even if you didn't know them.

Tone down your idealism, and start trying to take advantage of the situation instead of bemoaning it. And moaning is what this comes over as! Either you co-opt it for what YOU want it to be, or you let them get on with what THEY want it to be. Either way, whinging about it comes over as sour grapes, and is a pointless waste of time.

(And I haven't seen a single mention of what the licence is. If it supports the Four Freedoms, then you really don't have grounds for complaint. Let's hope it's BSD, so it's truly GPL-compatible :-)

(Oh, and they're an American company. Unfortunately, in The Land Of The Free, they've done their best to outlaw altruistic goodness :-(

Cheers,
Wol

Swift for Android?

Posted Jun 9, 2015 10:42 UTC (Tue) by coriordan (guest, #7544) [Link]

> Either you co-opt it for what YOU want it to be, or
> you let them get on with what THEY want it to be.

I'll take the second option and continue ignoring swift. There are better things to be doing than trying to outmanoeuvre Apple in a game where they hold all the cards.

My point was that I'm doubtful that Apple's actions will be easily twisted around to give people control over their software. If that was practical, then Apple wouldn't be doing what it's doing.

We don't have to wait for the licence to know this. Just look at Microsoft's example. They released a bunch of .NET code under a BSD licence a few months ago. Have you heard of any non-.NET free software project saying that they've benefited from this free code?

(One tactic MS used is suggesting patent danger, as described in points 1 and 3 of this article: http://www.ifross.org/artikel/4-shifty-details-about-micr... )

Swift for Android?

Posted Jun 9, 2015 12:28 UTC (Tue) by pboddie (guest, #50784) [Link] (1 responses)

With regard to altruism and without any after-the-fact rationalisation it can be described merely in terms of other outcomes involving more selfish individuals being less likely to lead to the longer term survival of those individuals' descendants and those selfish traits. Indeed, the arrival at a sustainable level of selfishness is precisely what many corporate forays into "open source" are all about: what do they absolutely need to share with others without feeling that they're "giving stuff away" to their competitors?

I think that what we've seen with WebKit forks says quite a lot about Apple's governance of Free Software projects, meaning that if Swift's licensing were even acceptable, there would eventually need to be well-resourced alternatives to the Apple-managed development effort. That might very well depend on adoption by the likes of Google. Maybe that explains why .NET/CLR adoption only occurs in environments where people want to be entirely dependent on some vendor or other and where people don't see the point of the independent development efforts that Free Software licences would allow.

Personally, I'd rather focus on actual Free Software that exists today as opposed to vapourware and promises.

Swift for Android?

Posted Jun 10, 2015 5:56 UTC (Wed) by ttonino (guest, #4073) [Link]

Apple needs mindshare and coders. Given the market share in numbers of Apple devices, entry to Android development is much more likely than stating on iOS.

And they're not going to be dependent on Oracle/Java (mistake of Google).

So... their own language. And a language is not what makes Apple competitive in the market - there are so many to choose from.

But they need ownership. Hence, this construction. Being the (benevolent?) dicator they will always be in the lead, whether they employ Java-like restrictions on field of use or not. And whether validation is required for compatible platforms or not.

Swift for Android?

Posted Jun 10, 2015 6:06 UTC (Wed) by ibukanov (subscriber, #3942) [Link] (1 responses)

> It almost certainly evolved because,

This is far from certain as there are many problems with that explanation. The Wikipedia [1] mentioned some, [2] is a recent result. There are even speculations that altruism evolved since it was a cheaper computational strategy as it could be that sophisticated long-lasting cheating required solving hard optimization problems and very good memory.

[1] http://en.wikipedia.org/wiki/Altruism_%28biology%29#Impli...
[2] http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3279739/

Swift for Android?

Posted Jun 10, 2015 8:23 UTC (Wed) by k3ninho (subscriber, #50375) [Link]

We're way into the noise and far from signal, so here's my tuppence: Swift's a minority language so far, on a minority platform vs Android. Free/Open Source projects might benefit from study and re-implementation but for me it doesn't scratch an itch I have. Conclusion: I'll wait and see if I ever cross paths with Swift.

>sophisticated long-lasting cheating
Dice? Poker? Monogamy having a moral rightness which is defeated by having more than one sponsoring potato-chip-brand partner? Making personal-relationship promises or child-rearing promises and breaking them? I wouldn't call fluid adult relationships 'cheating' at anything where they're mutually disposable or physically intense while building emotional closeness. I might call being in a fixed two-person relationship which does not meet the needs of one or both people as cheating you out of a happy life, but that's me being ornery in the face of your choice of words.

:-P
K3n.

Swift for Android?

Posted Jun 9, 2015 13:39 UTC (Tue) by jke (guest, #88998) [Link]

Even if Swift code can run on Android, one should not expect there will be no patent/copyright litigation.

I can think of at least two other languages that have been overshadowed by the actions of large corporations. How can I trust this not to be Apple's "me too."

Swift for Android?

Posted Jun 10, 2015 0:41 UTC (Wed) by flussence (guest, #85566) [Link]

Their goal should not only be to make it easy to write Android apps — there's no shortage of solutions to that — but to also make it easy to write Android apps that will run on iOS with minimal porting effort, because right now their walled ecosystem is second only to native Blackberry development for its hostility to developers just starting off. When the fad of the brand name starts wearing off, they'd better have a good backup strategy.

Swift for Android?

Posted Jun 9, 2015 6:05 UTC (Tue) by fredrik (subscriber, #232) [Link] (8 responses)

While it might look like a good idea on paper in reality you're better off with two code bases. Each optimized for its target platform. When you have two platforms that are only superficially similar, like IOS and Android, you have rather limited use of a shared programming language and library.

You'll get a race to the bottom, the lowest common denominator between the two platforms. The library will support the trivial things but will leave you hanging with the advanced stuff - where you actually have an advantage of a native app as opposed to a webapp. The secondary platform, Android, will not be able to implement all the features that are native to IOS. And you'll waste time on compatibility bugs because you're code is not native to at least one of the target platforms.

Your Android users, the second platform, will find the inherent deviation from their native look and feel awkward. To mirror what's native, you'll have to mirror the native api. So you'll still have custom code for each platform. Perhaps even two code bases again. Back where you started, with a lot of wasted effort in between.

Swift for Android?

Posted Jun 9, 2015 7:04 UTC (Tue) by fandingo (guest, #67019) [Link] (7 responses)

> Your Android users, the second platform, will find the inherent deviation from their native look and feel awkward. To mirror what's native, you'll have to mirror the native api.

Qt has proven that wrong for years. Mono Touch is even more relevant because it's explicitly designed for iOS and Android compatibility while following each platform's HIG.

There are major differences between a webapp and something like a Mono Touch app. I don't think that you can lump them together for any sort of sensible comparison.

No doubt there will be limitations, but I think you're being overly pessimistic.

Swift for Android?

Posted Jun 9, 2015 12:31 UTC (Tue) by cabrilo (guest, #72372) [Link] (4 responses)

The problem is that even a small limitation can be a deal breaker. If your client wants you to build an Android app, and they request feature X, you really can't tell them that because of the cross-platform framework you are using, you can't implement it.

The customer's response will be: "our competitor does X, we have to do it as well - take a look at their app and see how they've done it, then do the same". At which point, you'll find yourself rewriting the entire app in the native framework.

Not many clients I worked with are flexible about their feature set.

Swift for Android?

Posted Jun 9, 2015 13:57 UTC (Tue) by cesarb (subscriber, #6266) [Link]

> At which point, you'll find yourself rewriting the entire app in the native framework.

Wouldn't most cross-platform frameworks have a way to call into native code? So you'd have to rewrite only a small part of the application in the native framework.

Swift for Android?

Posted Jun 9, 2015 14:23 UTC (Tue) by fandingo (guest, #67019) [Link] (2 responses)

How about you give an example of a specific X? It's great casting vague aspersions, but I think reality cuts against you in two ways. First, Mono Touch, in particular, is far more mature and featureful than you're acknowledging. Second, the vast majority of mobile apps, especially ones that would be contracted out, are simple and don't need the features that push the envelope.

Swift for Android?

Posted Jun 10, 2015 16:57 UTC (Wed) by idupree (guest, #71169) [Link] (1 responses)

I'm having trouble googling "Mono Touch", getting mostly results from 2009 with no information. Do you mean Xamarin.iOS which wikipedia says used to be named MonoTouch?

Swift for Android?

Posted Jun 10, 2015 18:21 UTC (Wed) by fandingo (guest, #67019) [Link]

Yeah that's it. I didn't even realize they changed the name, and I clicked on a link that said "Introducing Xamarin.iOS - MonoTouch is now Xamarin.iOS‎."

Swift for Android?

Posted Jun 9, 2015 20:47 UTC (Tue) by sachingarg (guest, #38869) [Link] (1 responses)

IMHO, here we are conflating a language with an API/Framework.

Swift: Language
Java: Language
C#: Language
C/C++: Language

Qt: API/Framework
.NET/Mono: API/Framework

Hence, just because a language is open sourced, does not make its bindings available.

Swift for Android?

Posted Jun 10, 2015 19:58 UTC (Wed) by fredrik (subscriber, #232) [Link]

In this case Apple intends to open source the compiler plus the standard library. But in general you're right, conflating language and framework does not exactly further the discussion.

And interestingly Apple themselves will contribute a Linux port:

> * Swift source code will be released under an OSI-approved permissive license.
> * Contributions from the community will be accepted — and encouraged.
> * At launch we intend to contribute ports for OS X, iOS, and Linux.
> * Source code will include the Swift compiler and standard library.
> * We think it would be amazing for Swift to be on all your favorite platforms.

https://developer.apple.com/swift/blog/?id=29

GC again?

Posted Jun 9, 2015 2:55 UTC (Tue) by ncm (guest, #165) [Link] (5 responses)

Just what the world needs, yet another mostly-proprietary GC language.

No, thank you.

GC again?

Posted Jun 9, 2015 3:46 UTC (Tue) by jeff@uclinux.org (guest, #8024) [Link]

I totally agree!

But I think it likely that I'm not the audience for it. I once saw an interview where Jobs was talking about PARC and said they showed him Smalltalk and he didn't get it. I think that organization later internalized the use case for that sort of programming paradigm. Just so long as I don't have to use it... er... just so long as I don't have to code in it.

GC again?

Posted Jun 9, 2015 3:54 UTC (Tue) by Cyberax (✭ supporter ✭, #52523) [Link]

To be fair, it's intended to replace even more godawful dynamic language (Objective C).

GC again?

Posted Jun 9, 2015 16:24 UTC (Tue) by ikm (guest, #493) [Link] (2 responses)

It employs reference counting.

GC again?

Posted Jun 10, 2015 12:46 UTC (Wed) by intgr (subscriber, #39733) [Link] (1 responses)

Reference counting is one of many techniques for automatic garbage collection.

GC again?

Posted Jun 10, 2015 17:36 UTC (Wed) by thestinger (guest, #91827) [Link]

It doesn't collect cycles, so it's not substantially different than C++ smart pointers. It still has manual memory management support and it's not like a garbage collected language where low-level code has to worry about objects moving around (trace hooks, etc.).

As open source code, Apple's Swift language could take flight (ITWorld)

Posted Jun 15, 2015 16:51 UTC (Mon) by pabs (subscriber, #43278) [Link]


Copyright © 2015, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds