30

Behold Swift. The new programing language from Apple for iOS

9 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

  • Account deleted 9 years ago (edited 9 years ago )

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

    15 points
    • Diego Lafuente, 9 years ago

      I know the feeling.

      3 points
    • Ian GoodeIan Goode, 9 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
      • Account deleted 9 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.

        0 points
    • Maciej ZadykowiczMaciej Zadykowicz, 9 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, 9 years ago

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

      1 point
  • Varun VachharVarun Vachhar, 9 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, 9 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 Lafuente, 9 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, 9 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, 9 years ago

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

      0 points
  • Daniel GoldenDaniel Golden, 9 years ago

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

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

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

    5 points
  • Jim SilvermanJim Silverman, 9 years ago

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

    5 points
  • Grant NestorGrant Nestor, 9 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
  • Grant NestorGrant Nestor, 9 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).

    2 points
    • Meng ToMeng To, 9 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, 9 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, 9 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, 9 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, 9 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, 9 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, 9 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, 9 years ago

      Type inference in this case is a compiler concern.

      2 points
    • T LT L, 9 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
  • Justin BelcherJustin Belcher, 9 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
  • Henrique Alves, 9 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
  • Brendan GramerBrendan Gramer, 9 years ago

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

    1 point
  • Cihad TurhanCihad Turhan, 9 years ago

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

    1 point
  • Mariusz CieslaMariusz Ciesla, 9 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, 9 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, 9 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, 9 years ago

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

      0 points
  • Diego Lafuente, 9 years ago

    The examples are really digestable.

    1 point
    • Thomas DidrelThomas Didrel, 9 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
  • Diego Lafuente, 9 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
  • Hendrik Runte, 9 years ago (edited 9 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
  • Andrew HoltAndrew Holt, 9 years ago

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

    0 points
  • Ian GoodeIan Goode, 9 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, 9 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