• 0

Open sourcing Swift


Question

Last year, Apple introduced Swift, its very own programming language which was focused on making it easier to build apps. Now, in a bid to make it more palatable to developers, Apple is making another big move: It's making Swift open source. That'll give developers full access to all of Swift's inner workings, and it might even tempt over people who were worried about adopting a proprietary Apple language. "We think Swift is the next big programming language, the one that we'll all be doing application and system programming on for 20 years to come," Apple's SVP of software engineering, Craig Federighi, said during WWDC today. "We think Swift should be everywhere and used by everyone." The language is also getting some upgrades this year with Swift 2, which includes support for new optimization technology, protocol extensions and much shorter compile times.

 

Source: http://www.engadget.com/2015/06/08/swift-open-source/

 

User's comment:

 

I am guessing that Microsoft will port this to Windows in no time.

  • Like 2
Link to comment
Share on other sites

Recommended Posts

  • 0

Oh freaken' awesome!

 

I wasn't sure I really wanted to get into Swift as it's locked to Apple pretty securely, this has just increased my interest a whole lot. I also had 3 hours of sleep last night and am not even entirely sure I am forming coherent sentences. So maybe it's not that exciting.

 

astropheed dusts off his swift book

 

 

...Now if only we could change that name.

  • Like 2
Link to comment
Share on other sites

  • 0

I love how this is in "Back Page News", when this is one of the most important steps in Apple History. 

 

There's only one sentence about it in this article: https://www.neowin.net/news/apple-announces-ios-9-introducing-better-multitasking-and-more-intelligence

 

And in one further significant announcement, Apple has announced that it is making its Swift 2 programming language open source.

 

I do agree that this deserves its own article.

Link to comment
Share on other sites

  • 0

Apple is open sourcing Swift. Great news, but not unexpected. What caught me by surprise though, was the fact that they are also open sourcing the Swift standard library, and supporting it on Linux. I suspect that Swift will be very popular on servers soon.

  • Like 2
Link to comment
Share on other sites

  • 0

Apple is open sourcing Swift. Great news, but not unexpected. What caught me by surprise though, was the fact that they are also open sourcing the Swift standard library, and supporting it on Linux. I suspect that Swift will be very popular on servers soon.

Would be nice if it came to Windows too. Oh well, once it's open-sourced somebody will most likely bring it to Windows anyway.

Link to comment
Share on other sites

  • 0

Not sure what the relevance of that language would be on non-Apple platforms. Swift was created to prevent making it easy to port apps to Android or other platforms; that, and the fact that Objective-C sucks, are the only reasons this language exists. If you want a modern systems language today Rust is available everywhere and its resource management system is way better designed than Swift's ARC (actually it's better designed than almost all other programming languages, but ARC is a really questionable resource management system). For application development Scala and F# are great choices for JVM/.NET compatibility respectively.

  • Like 1
Link to comment
Share on other sites

  • 0

Not sure what the relevance of that language would be on non-Apple platforms. Swift was created to prevent making it easy to port apps to Android or other platforms; that, and the fact that Objective-C sucks, are the only reasons this language exists. If you want a modern systems language today Rust is available everywhere and its resource management system is way better designed than Swift's ARC (actually it's better designed than almost all other programming languages, but ARC is a really questionable resource management system). For application development Scala and F# are great choices for JVM/.NET compatibility respectively.

 

Swift was created because Apple wanted a better language than Objective-C, but also needed to be compatible with Objective-C as well as a good fit for their existing frameworks. Preventing ports doesn't really come into it. Cocoa Touch and Android are sufficiently different that it was never going to be easy to port apps anyway. In any case, Xamarin is a thing and makes the point moot.

 

No language is prefect, and there will always be things that other languages do better than Swift. However, Swift is getting a lot of things right, and it is enjoyable to work with. That's a good reason enough to use it. Why not keep an open mind? There's always space for new languages. F# and Scala were the new kids on the block once too.

Link to comment
Share on other sites

  • 0

I honestly don't see it having a large impact. Objective-C was available for other platforms too, yet I've never seen a serious app for Linux made with it

Link to comment
Share on other sites

  • 0

Would be nice if it came to Windows too. Oh well, once it's open-sourced somebody will most likely bring it to Windows anyway.

Remobjects has already brought it to windows and they are letting people use it for free with Remobjects Elements Silver. remobjects.com

 

You can compile for .net, java bytecode, and android (at least I think its the same as their c# and pascal products that do that) I wish their c# one was the one thats free, or at least not $799) cause thats the one I'm interested in.

Link to comment
Share on other sites

  • 0

Swift was created because Apple wanted a better language than Objective-C, but also needed to be compatible with Objective-C as well as a good fit for their existing frameworks. Preventing ports doesn't really come into it. Cocoa Touch and Android are sufficiently different that it was never going to be easy to port apps anyway. In any case, Xamarin is a thing and makes the point moot.

Why couldn't Apple use an existing language? They created a language such that every line of code written in it only runs on Apple platforms. Xamarin doesn't make the point moot because you cannot run Swift code on Xamarin. Your Swift code is locked. And yes environments are different but any non-UI or otherwise platform-specific task can be reusable - unless it's written in Swift. You don't necessarily get great code re-use coding apps in, say, C++, but you're guaranteed 0% with Swift.

 

I'm interested in all programming languages and really I fail to see a point for Swift outside creating vendor lock-in - its resource management system is a bizarre, problematic choice, and the nice things about it like functional features are done better in other application languages.

Link to comment
Share on other sites

  • 0

Why couldn't Apple use an existing language? They created a language such that every line of code written in it only runs on Apple platforms. Xamarin doesn't make the point moot because you cannot run Swift code on Xamarin. Your Swift code is locked. And yes environments are different but any non-UI or otherwise platform-specific task can be reusable - unless it's written in Swift. You don't necessarily get great code re-use coding apps in, say, C++, but you're guaranteed 0% with Swift.

 

I'm interested in all programming languages and really I fail to see a point for Swift outside creating vendor lock-in - its resource management system is a bizarre, problematic choice, and the nice things about it like functional features are done better in other application languages.

 

Isn't this sort of an odd thing to say from someone who continually praises C#.NET ? Microsoft, and specifically their programming languages, are not exactly known for vendor agnosticism.

 

I actually find Swift to be quite nice and approachable and I'm glad Apple made it.

  • Like 2
Link to comment
Share on other sites

  • 0

Apple is open sourcing Swift. Great news, but not unexpected. What caught me by surprise though, was the fact that they are also open sourcing the Swift standard library, and supporting it on Linux. I suspect that Swift will be very popular on servers soon.

Absolutely no sane person would ever use swift for servers. That's like saying everyone will start using visual basic to create their mission critical infastructure applications.

  • Like 2
Link to comment
Share on other sites

  • 0

Isn't this sort of an odd thing to say from someone who continually praises C#.NET ? Microsoft, and specifically their programming languages, are not exactly known for vendor agnosticism.

 

I actually find Swift to be quite nice and approachable and I'm glad Apple made it.

Originally Microsoft adopted C++ which is an ISO standard and one of the most cross-platform languages. Then they created the .NET framework which is an OS-neutral and language-neutral platform, and it is standardized. C# has never been a proprietary language either. While Microsoft has historically been unsupportive of open-source and cross-platform efforts, it was nonetheless in the design of .NET to allow alternative implementations and Microsoft has always allowed this (i.e. Mono). In recent years they've openly embraced and supported these developments, so the accurate thing to say is that C# and .NET have been nothing but great news for cross-platform and open-source development, and they keep getting better at it.

 

While this is going on, just last year Apple creates a new proprietary language that compiles to native code that only runs on Apple platforms. It's one thing to blame attitudes and decisions in the year 2000, but in 2014 those same attitudes make way less sense.

 

Anyway, there's the beginning of some openness on the part of Apple which is interesting I guess.

Link to comment
Share on other sites

  • 0

Why couldn't Apple use an existing language? They created a language such that every line of code written in it only runs on Apple platforms. Xamarin doesn't make the point moot because you cannot run Swift code on Xamarin. Your Swift code is locked. And yes environments are different but any non-UI or otherwise platform-specific task can be reusable - unless it's written in Swift. You don't necessarily get great code re-use coding apps in, say, C++, but you're guaranteed 0% with Swift.

 

I'm interested in all programming languages and really I fail to see a point for Swift outside creating vendor lock-in - its resource management system is a bizarre, problematic choice, and the nice things about it like functional features are done better in other application languages.

 

Chris Lattner, the guy behind Swift, was pretty open about wanting to open source Swift back when it was first introduced. So here we are, and Apple is open sourcing Swift and its standard library, and is going to support that on Linux. I think that their expressed intent and actions go counter to your lock-in argument.

 

As for why not use an existing language, I'd ask why not create a new one? What's wrong with that? Should Microsoft have used Java instead of creating C# back when they did? Should they have adopted Haskell instead of creating F#? Wouldn't the world have been poorer for it if GoLang wasn't a thing?

Link to comment
Share on other sites

  • 0

Absolutely no sane person would ever use swift for servers. That's like saying everyone will start using visual basic to create their mission critical infastructure applications.

 

What would you use for "mission critical applications"? I'm not sure that means anything. Plenty of mission critical applications are being written in JavaScript, of all things.

Link to comment
Share on other sites

  • 0

What would you use for "mission critical applications"? I'm not sure that means anything. Plenty of mission critical applications are being written in JavaScript, of all things.

No they're not, javascript is a client side scripting language (not a programming language), and nodejs is not a mission critical service that any sane person would use (not to say it's not good, just it's not mission critical).

Mission critical things would be written in: asm, c, c++, c#, fortran, ada, etc.

Link to comment
Share on other sites

  • 0

No they're not, javascript is a client side scripting language (not a programming language), and nodejs is not a mission critical service that any sane person would use (not to say it's not good, just it's not mission critical).

Mission critical things would be written in: asm, c, c++, c#, fortran, ada, etc.

 

JavaScript, and scripting languages in general, are programming language. While JavaScript wouldn't be my personal choice for large projects (for these I like static typing), plenty of people in fact do use it.

 

What makes a language good for mission critical applications? I contend that programmer safety would be near top of the list. I would definitely not choose C or C++. I want more safety than what those languages can give me. Swift would actually not be a bad choice. It's safer than Java (e.g. avoids NullPointerException), which in turn is a hell of a lot safer than C and C++.

 

Swift ticks a lot of boxes when it comes to safety. Off the top of my head: Statically and strongly typed, built-in semantics for handling optionals, checked exceptions with semantics for opting out, encourages immutability, exhaustive switch cases. It's a modern language that has learned from past mistakes.

Link to comment
Share on other sites

  • 0

JavaScript, and scripting languages in general, are programming language. While JavaScript wouldn't be my personal choice for large projects (for these I like static typing), plenty of people in fact do use it.

 

What makes a language good for mission critical applications? I contend that programmer safety would be near top of the list. I would definitely not choose C or C++. I want more safety than what those languages can give me. Swift would actually not be a bad choice. It's safer than Java (e.g. avoids NullPointerException), which in turn is a hell of a lot safer than C and C++.

 

Swift ticks a lot of boxes when it comes to safety. Off the top of my head: Statically and strongly typed, built-in semantics for handling optionals, checked exceptions with semantics for opting out, encourages immutability, exhaustive switch cases. It's a modern language that has learned from past mistakes.

It's a new language, there has been no risk analysis of it or how reliable it's output code is, therefore it is not and will not be used for anything mission critical, and it'll probably stay this way forever.

JS is a scripting language, not a true programming language, it is not compiled.

 

If you want safety with C or C++, then you'd mainly avoid mallocing - which are the rules that aviation have to abide by (and they do use C).

Link to comment
Share on other sites

  • 0

JS is a scripting language, not a true programming language, it is not compiled.

 

So you think to be a programming language it has to compile?

Link to comment
Share on other sites

  • 0

So you think to be a programming language it has to compile?

It does, there are compiled programming languages (e.g. C) and there are interpreted scripting languages (e.g. JS).

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.