new programming language swift

Swift App: 1 year Later

2nd June 2014, changed the world of iOS and OS X development – forever.

This time last year iOS developers across the globe had no idea that in a few days Apple would launch a brand new programming language called Swift at their Worldwide Developer Conference. We were streaming the WWDC keynote live in London when Apple announced the arrival of Swift. I remember looking over at Richard, our Head of App Dev and creator of Amsys iOS Development training, with his jaw on the floor.

That same evening, Apple released the full documentation for developers to pore over and learn the Swift Syntax!

 

Why did Apple create Swift?

Apple had been working on Swift for around 4 years prior to its launch. Back then, iPhones and iPads were surging in popularity with consumers; meanwhile enterprises were quickly following suit.

However, the demand for iOS developers was fast outstripping supply. So Apple embarked on a mission to create “a new language that lets everyone build amazing apps.”

“Because the people who are crazy enough to think they can change the world, are the ones who do.”

Apple intended to remove the association that programming is hard to learn and the remit of a select few. To do this, Apple needed to move away from Objective-C.

Even though Objective-C had “served Apple incredibly well” over the previous 2 decades – it relied heavily on C. Consequently, there were a number of limitations, which meant the language couldn’t change or evolve as quickly Apple would have liked.

Objective-C also has a rather verbose syntax, quite different from other mainstream languages, which can put some developers off from learning it. To bring Swift into the mainstream, Apple borrowed ideas from a number of languages including Objective-C, Rust, Haskell, Ruby, Python and C#.

 

How did the developer community react?

Change, in all its forms, is usually met with some resistance. When Apple released Final Cut X, the reaction was “bitter and emotional.” Therefore, it was no surprise that feedback from the developer community was mixed. Although there were many brimming with positivity and excitement.

Indeed, existing developers of non-Apple languages who disliked Objective-C’s syntax were even inspired to start learning Swift.

“As a C# developer, I can read and understand the code without any issues. That’s a good thing for Apple. I’m sure Objective-C is great but it’s too foreign for me and didn’t want to toy with it for fun, not worth the effort. But I can write an app or two with this one.”

Within days… a Swift version of the hit app “Flappy Bird” was released on Github – validating Apple’s claim that Swift is easy to learn language. Then, in October 2014, LinkedIn announced that they had developed their first iOS app only using Swift.

“We began working in Objective-C for two weeks, and then when WWDC came around, we heard about the new language and decided to go all in on Swift and start from scratch.”

adoption of swift

Unprecedented demand & adoption

By January 2015, Swift was predicted to become one of the top 20 languages by Q3 in the ranking guide released by analyst firm, RedMonk. A feat that took Google’s Go – 5 years to achieve. What’s more – a survey released in Feb 2015 revealed that a massive 20% of developers had already started to use Swift.

Swift has also given birth to a new community of developers – new and existing, populated with members eager to learn and to get a foot on the development ladder. Today there are 92 Swift meet up groups with a total 23,000 members, across 68 cities in 27 countries, each providing monthly talks and workshops.

Within weeks of WWDC 2014, various free and paid for resources popped up across the web to help more people learn how to code. Here at Amsys we also jumped at the chance to create a range of Swift training courses and exams, the 1st of which was launched last Summer, and subsequently grown in popularity ever since.

Not Just a Flash in the Pan

As Swift’s stability and adoption rate grows, more and more enterprises and their in-house developers will start to accept Swift as a commercially viable language.

swift-screenshot

So… what does it take to develop apps using Swift?

Because of its history, Objective-C has a lot of legacy that involves using many [ ] and @ symbols, which does not make it the most readable language. Swift does away with all this.

Swift is much more readable, borrowing heavily from languages such as Rust, Haskell and Python. Swift code is much easier to maintain, requires less housekeeping than Objective-C.

Swift is is also safer to use, hiding pointers and forcing developers to declare the type of data being used within the app. Swift also requires less code and produces faster code than Objective-C.

To develop in Swift, you obviously need an understanding of the language.

From our experience, Swift is easier to pick up than other languages, and if you come from another language you will certainly find it very familiar. Once you get into the iOS or OS X frameworks, the building blocks of any app, you will notice they are identical in functionality, they just differ in their syntax.

If you’re coming from Objective-C to Swift, you should feel right at home.

The future…

WWDC 2015 will certainly bring us up to date to with Swift. Apple has not rested on their laurels this last year They have delivered a number of updates to the language as well as their developer tools. Only Apple knows what will be announced, but the developer community cannot wait.

6 Replies to "Swift App: 1 year Later"

  • Thanks for the post Charley. I remember the announcement of Swift last year. I was very excited. The syntax was much easier to read and understand for me coming from C# development.

    I quickly downloaded the iBook for Swift and started working with it. I found some great tutorial sites that helped bridge the knowledge gap and fuel my Swift development. Since the release of Swift I have published two apps in Swift. I love Swift!

    There are some downsides to Swift, well one in particular. Apple isn’t really finished with it. Currently it is a version 1.2. However, each time there is a new release the app has to be updated. The update from 1.0 to 1.2 wasn’t as bad as some of the other releases but it’s still not convenient.

    Also, where is Swift going. I’m excited to hear news about Swift and what Apple is going to do with it. The recently released the Research Kit and it is written in Objective-C. Hopefully they will start creating APIs in Swift.

    • Hey Jeremiah,

      Thanks for your comment.. great to hear about your Swift App Development projects. Do you have some links to the apps to share with us? Would love to see!

      Thanks,
      Charley

  • Jim Stead

    Objective C was definitely getting a bit long in the tooth, and Swift is a fine replacement. It’s the future and the way to go.

    But Swift is no more maintainable than objc or any other serious language, and comments about square brackets are silly. Any professional programmer worth her rate can pick up a new language in a week.

    • Hey Jim,

      Thanks for your comments…

      Re: Your last point. From delivering training courses to new developers. In the vast majority of cases the feedback is normally that Objective-C’s syntax is much harder to pick up that Swift.

      True seasoned developers should have no trouble but new developers certainly seem to take to Swift far easier than Objective-C.

      What’s exciting now is that we have a choice.

      Thanks,
      Charley

  • manly_man

    Swift is not faster than ObjC. And there’s still fantastic RubyMotion!!

Leave a Reply

Your email address will not be published. Required fields are marked *

I accept the Privacy Policy * for Click to select the duration you give consent until.