• 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
https://www.neowin.net/forum/topic/1259534-open-sourcing-swift/
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
  • 0
  On 08/06/2015 at 21:40, fusi0n said:

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

 

  Quote

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.

  • 0
  On 09/06/2015 at 02:54, vhane said:

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.

  • 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
  • 0
  On 09/06/2015 at 03:51, Andre S. said:

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.

  • 0
  On 09/06/2015 at 03:05, Kamran Mackey said:

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.

  • 0
  On 09/06/2015 at 04:29, vhane said:

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.

  • 0
  On 09/06/2015 at 05:31, Andre S. said:

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
  • 0
  On 09/06/2015 at 02:54, vhane said:

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
  • 0
  On 09/06/2015 at 05:47, astropheed said:

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.

  • 0
  On 09/06/2015 at 05:31, Andre S. said:

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?

  • 0
  On 09/06/2015 at 06:12, n_K said:

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.

  • 0
  On 09/06/2015 at 07:05, vhane said:

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.

  • 0
  On 09/06/2015 at 07:33, n_K said:

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.

  • 0
  On 09/06/2015 at 08:20, vhane said:

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).

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

    • No registered users viewing this page.
  • Posts

    • We went from a Latitude 7450 to Dell Pro 14 Plus PB14250
    • EA Sports UFC 5 is free-to-play on Xbox Series X|S this weekend by Pulasthi Ariyasinghe Every Thursday Microsoft brings in a fresh slate of games for Xbox gamers to try over the weekend as a part of its Free Play Days promotion. The latest refresh that arrived today only revealed a single title for the weekend, and that's EA Sports UFC 5. This is a special occasion as well. Unlike the standard events, this one does not require any tier of Game Pass to jump in. All Xbox Series X|S owners can play the game over the weekend, even if they do not have a Core subscription. As always, any progress made during the weekend also carries over automatically if you decide to purchase the game afterward. Coming in from EA Sports, UFC 5 is the latest entry in the long-running mixed martial arts fighting games. This installment landed in 2023 for the latest generation consoles. Built on DICE's Frostbite Engine for the first time, the title event received an M rating by the ESRB for its realistic injury system, as EA wanted to make a more authentic experience akin to the real-world sport. The damage system, dubbed the Real Impact System, involves depicting blood and sweat on fighters as well as facial injuries. Having injuries like bruised eyes or broken noses can even affect the performance of a fighter due to impaired vision or breathing difficulty. A doctor stoppage may even happen if the injuries become too severe. UFC 5 offers a single-player career mode to become the top-ranked fighter, online modes for competitive action, and special events tied to real-world fights. Here are the store links for the game: UFC 5 - $27.99 (Xbox Series X|S) UFC 5 Deluxe Edition - $31.99 (Xbox Series X|S) UFC 5 Ultimate Edition - $89.99 (Xbox Series X|S) This Free Play Days promotion will end on Sunday, June 29, at 11:59 pm PT. Following this, expect another round of games to enter the program next Thursday, July 3.
    • Windows 11 KB5060826 optional update brings better Setup, new data migration tool, more by Sayan Sen Alongside KB5060829 for Windows 11 24H2, Microsoft has also released its C-release non-security preview update for Windows 11 23H2 and 22H2 today. The new update is rolling out under KB5060826 (builds 22621.5549 and 22631.5549). KB5060826 brings an upgraded Setup which will now let admins choose whether to deploy critical updates during the OOBE (the initial out-of-box experience setup on Windows). Alongside that, it also adds the new PC migration experience on Windows Backup, as well as the default app changes related to the European Economic Area (EEA) region. The full changelog is given below: First up we have the changes and improvements for Gradual Rollout: [App defaults] New! We are rolling out some small changes in the European Economic Area (EEA) region for default browsers through the Set default button in Settings > Apps > Default apps: Additional file and link types will be set for the new default browser, if it registers them. The new default browser will be pinned to the Taskbar and Start menu unless you choose not to pin it by clearing the checkboxes. There is now a separate one-click button for browsers to change your .pdf default, if the browser registers for the .pdf file type. [PC Migration] New! The PC-to-PC migration experience in Windows is starting to roll out. You’ll begin to see the landing and the pairing page in the Windows Backup app, giving you a first look at what’s coming. In the full experience, you’ll be able to transfer files and settings from an old PC to a new one during setup. Support for this feature during PC setup will arrive in a future update. The rollout is being introduced in phases to support a smooth experience. [Windows Share] ​​​​​​​New! When you share links or web content using the Windows share window, you will see a visual preview for that content. Up next, we have Normal Rollout features: [Windows Setup] New! Admins can configure whether a new device gets critical updates during the out-of-box experience (OOBE). The update has a single known issue related to Noto fonts. You can view the support article here on Microsoft's official website. The update can be obtained by clicking on "Check for optional updates" inside Windows Update. You can also download it manually from Microsoft Update Catalog website.
    • American? Yer whole 120v limitation is madness.  You can still get low powered pcs , nice, that'll do the job 
    • People want a resizable taskbar, not tiny icons on a fat one. Microsoft, you've done it again.
  • Recent Achievements

    • One Month Later
      jfam earned a badge
      One Month Later
    • First Post
      TheRingmaster earned a badge
      First Post
    • Conversation Starter
      Kavin25 earned a badge
      Conversation Starter
    • One Month Later
      Leonard grant earned a badge
      One Month Later
    • Week One Done
      pcdoctorsnet earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      567
    2. 2
      ATLien_0
      186
    3. 3
      +FloatingFatMan
      176
    4. 4
      Michael Scrip
      144
    5. 5
      Xenon
      115
  • Tell a friend

    Love Neowin? Tell a friend!