31

Behold Swift. The new programing language from Apple for iOS

5 years ago from , UX/UI

Apple showed today a glimpse of Swift, a new programing languages with those characteristics that coders love, like generics, closures and so on. What do you think about?

I'm really intrigued with it. As a designer who likes to code, this seems a good idea, in fact, the code examples seemed readable to me.

50 comments

  • Terkel GjervigTerkel Gjervig, 5 years ago (edited 5 years ago )

    I spent the last six months learning Objective-C .. damn

    15 points
    • Diego LafuenteDiego Lafuente, 5 years ago

      I know the feeling.

      3 points
    • Ian GoodeIan Goode, 5 years ago

      That's awesome, I'm jealous. You're in a much better position than someone who would be starting to learn Swift with no Objective-C experience.

      16 points
      • Terkel GjervigTerkel Gjervig, 5 years ago

        You're right! I will continue developing my Objective-C skills and finish the apps I started.

        Here's also a good excerpt from the Treehouse FAQ:

        Q. I just started learning Objective-C, should I just learn Swift instead?

        A. As mentioned above, Apple has released a comprehensive book on the language so by all means start learning Swift. After glancing through the book I believe that on some levels Swift may be harder to learn because of the advanced features mentioned above. My suggestion would be to continue learning Objective-C, although it may look difficult syntactically but conceptually it's a much simpler language and great for a beginner. Once you get the hang of Objective-C then switching over to Swift will be a lot easier because the two languages are quite similar.

        1 point
    • Maciej ZadykowiczMaciej Zadykowicz, 5 years ago

      so you'll have a head start opposed to someone who didn't. It's not like it's that different plus Foundation, UIKit etc are still intact.

      0 points
    • Will RaxworthyWill Raxworthy, 5 years ago

      The familiarity with the Cocoa APIs you now have will make picking up swift a lot easier.

      1 point
  • Varun VachharVarun Vachhar, 5 years ago

    Super excited for this and can't wait to try it. I love that:

    • They implemented Bret Victor's live coding stuff
    • No need to worry about C stuff like pointers and memory management
    • They've created one of the easiest gaming engine to get started with
    • It has a low barrier to entry like JS. So, expect a lot more apps for both OSX and iOS.

    The only downside is that this isn't cross-platform. I can live with that for now.

    8 points
    • Grant NestorGrant Nestor, 5 years ago

      I love the playground with its Bret Victor-style approach. I'm downloading Xcode 6 beta now to start playing with it. Now we just need a similar IDE for web development (maybe NoFlo?).

      0 points
    • Diego LafuenteDiego Lafuente, 5 years ago

      When you say cross platform you mean windows-mac? You can code for OS X and iOS with Swift.

      1 point
    • Kyle BavenderKyle Bavender, 5 years ago

      Wanted to shout out loud when I saw the Bret Victor inspired playground. His "Inventing on Principle" talk shook up my perception of creating with code, and the rest of his research has left such an impact on me I noted the day I discovered his work in my journal. I consider him something of a prophet in our field — against the grain, visionary, yet solitary/singular/independent.

      Also interesting: he used to work at Apple, but can't talk about the prototypes he worked on that never saw the light of day.

      0 points
    • Hamish MacphersonHamish Macpherson, 5 years ago

      +1 for Bret Victor. The guy's a genius; really happy to see some of his ideas coming to light.

      0 points
  • Bardan Gauchan, 5 years ago (edited 5 years ago )

    Seems like the perfect time to get into iOS development. Kinda really excited!

    5 points
  • Jim SilvermanJim Silverman, 5 years ago

    Apple kills Flash, then announces its own version ActionScript with tongue-in-cheek name. i like their style.

    5 points
  • Daniel GoldenDaniel Golden, 5 years ago

    If it's roughly as effective as the Pokémon attack, it's going to be laughable.

    5 points
  • Grant NestorGrant Nestor, 5 years ago

    I was just about the start the Design+Code book (designcode.io) to learn Xcode + Obj-C but I think I'm better off just reading the Swift book (https://itunes.apple.com/gb/book/swift-programming-language/id881256329?mt=11).

    3 points
    • Meng ToMeng To, 5 years ago

      Everything in the book still applies. I will write a chapter 4 with new techniques using Swift, live rendering, cloudkit, extensions, etc.

      I looked at the book and it's very code centric. I will try to make sense of it all for designers.

      16 points
      • Maciej JurczakMaciej Jurczak, 5 years ago

        Great, I bought your book 2 days ago and was worried after today announcement, but this information cheered me up :)

        2 points
      • Diego Lafuente, 5 years ago

        Please. The book has no reference on how to use it with the actual UI from iOS. Prototyping fast with code + interface builder can be nice.

        1 point
  • Jake Lazaroff, 5 years ago

    I'm skeptical of the performance claims (type inference is sloooooooow) but it'll be interesting see how the language looks. I'm excited.

    2 points
    • Varun VachharVarun Vachhar, 5 years ago

      Considering you can build JS apps which perform on par with native I'm going to guess this will work just fine.

      1 point
      • Jake Lazaroff, 5 years ago

        Not quite. If an app is not computationally expensive (for example, rendering a list of tweets or displaying chat messages as they come in) then it may be that computers are fast enough that there is no discernible difference between native code and interpreted code. However, if you step outside that realm (for example, rendering a 3D scene with ray tracing, bump maps, subsurface scattering, etc) then you will be able to coax much better performance out of native code.

        TL;DR even if from a user's perspective Hello World in JS performs just as well as in C, Call of Duty will not.

        4 points
        • Varun VachharVarun Vachhar, 5 years ago

          Yes, I totally agree with that. But, even WebGL and Canavas work quite nicely on mobile. Surely an Apple product will be better optimized than those technologies.

          Not to mention their new Metal API provides access to lower APIs.

          Maybe I'm just too optimistic :)

          0 points
    • Adrian SchaedleAdrian Schaedle, 5 years ago

      Type inference in this case is a compiler concern.

      2 points
    • T LT L, 5 years ago

      Type inference is not slow. It might be slower than typing a type directly but it doesn't slow running application because it determines types at compile time. Although it might take longer to compile. But we are talking about milliseconds.

      1 point
  • Grant NestorGrant Nestor, 5 years ago

    I think Xcode's new playground is the most intriguing part of this release. Swift + Xcode 6 + CloudKit might be just the right mix to get more designers programming because it introduces a) a readable programming language with Swift, b) realtime feedback with Xcode playground, and c) server-side abstraction with CloudKit (server admin being the first and oftentimes fatal obstacle in learning to program and develop apps).

    2 points
  • Brendan GramerBrendan Gramer, 5 years ago

    Quartz Composer is Dead, Long live Swift! ;-)

    1 point
  • Mariusz CieslaMariusz Ciesla, 5 years ago

    I haven't been so excited about a programming language since Ruby — this looks like best parts of ECMAscript 6 and Ruby mashed together into one big blob of awesome.

    1 point
    • Suresh SelvarajSuresh Selvaraj, 5 years ago

      Same here! It's weird that Swift was my favorite part of the Keynote. Actually, more than the language, I think I'm excited about the Playground tool they've built - though it looks heavily inspired by Bret Victor's tool.

      1 point
      • George ChenGeorge Chen, 5 years ago

        It's not weird at all because that's the most surprising /exciting thing Apple can do at a Developer Conference and they did it.

        0 points
    • Tiago Sousa, 5 years ago

      Yep, look like js the bits I've read so far.

      0 points
  • Henrique Alves, 5 years ago

    Dude I was about to invest some money on iOS training but decided hold until this event. Glad I did it. Swift looks great! Can't wait to get my hands dirty :)

    1 point
  • Justin BelcherJustin Belcher, 5 years ago

    I'm so pumped for this. Even doing some Smalltalk dev back in the day I could never get down with how Obj-C "felt" to code with. Smart of Apple to lower the barrier to entry and give JS devs a way in.

    1 point
  • Cihad TurhanCihad Turhan, 5 years ago

    I was about to start learning Objective C. So this was the right time ;)

    1 point
  • Diego Lafuente, 5 years ago

    Swift is a new programming language for iOS and OS X apps that builds on the best of C and Objective-C, without the constraints of C compatibility. Swift adopts safe programming patterns and adds modern features to make programming easier, more flexible, and more fun.

    Fragment from the book “The Swift Programming Language”. iBooks. https://itun.es/es/jEUH0.l

    1 point
  • Diego Lafuente, 5 years ago

    The examples are really digestable.

    1 point
    • Thomas DidrelThomas Didrel, 5 years ago

      Yeah true, I've been reading through the first few pages. I can't wait to be able to download Xcode 6!

      0 points
  • Ian GoodeIan Goode, 5 years ago

    I wonder where this will leave projects like Phonegap, Cordova, Ionic Framework, etc. Will it make iOS development accessible enough that web developers will just bypass those tools in favour of jumping straight in with Swift? It seems to remove or at least hide a lot of the lower-level stuff.

    0 points
    • Sebastian De DeyneSebastian De Deyne, 5 years ago

      A major selling point for those examples is that you can easily publish your app on multiple platforms though, so they'll definitely still have their place.

      2 points
  • Andrew HoltAndrew Holt, 5 years ago

    The live coding stuff is pretty killer, can't wait to dig into this.

    0 points
  • Hendrik Runte, 5 years ago (edited 5 years ago )

    Playing with the simple examples from the Swift book in Xcode 6b Playground makes a lot of fun as long as Xcode does not crash. Alas, this happens quite a lot while targeting iOS as platform. Switching to 'OS X' and commenting out 'import UIKit' seems to make it faster and more stable.

    0 points