Brent Simmons
Brent Simmons

SAN FRANCISCO — When I spent time around WWDC this past week, one word was on everybody’s lips: Swift.

Apple’s newly-announced programming language brings a number of benefits, and marks a major change in how developers can build apps for the iPhone and iPad. Before now, Apple has been relying on Objective-C, which was built on the foundation of the venerable C programming language.

Apple’s change is good news for consumers and developers alike. Swift’s introduction has pumped new life into the already vibrant Apple developer ecosystem, and seems poised to spur a new generation of innovative applications.

At its core, Swift is designed to be just that – a fast and easier way for people to build programs for the iPhone, iPad and Mac. The language does away the more complicated trappings of Objective-C, and replaces it with a simplified syntax that’s easier to pick up, but still feels familiar.

The new approach has a fan in Brent Simmons, the Seattle-based developer who makes up one third of the team behind Vesper, a note-taking app for the iPhone.

“It looks to me like I can get more done, more quickly,” he said in an interview with GeekWire. “There’s less of the fiddly little housekeeping stuff that you have to do in more traditional languages.”

It also comes with a number of powerful features Objective-C has lacked, including Playgrounds, a system that allows developers to see how changes to their project affect their end product as they add to and tweak their code. Under Objective-C, developers needed to wait for their project to compile and run before they could test any code changes, which can be a time-consuming process.

One of the interesting features of Swift is that it does away with Objective-C’s emphasis on declaring variable types. Now, developers don’t have to specify in the code whether a variable is a string of text or a floating-point number. The compiler automatically handles the data for them.

A sample of Swift code
A sample of Swift code
Wayne Bishop.
Wayne Bishop

What’s more, Swift and Objective-C use the same compiler, so it’s possible for an app to have both Objective-C, C and Swift source code. That’s a huge benefit for programmers like Simmons who are already familiar with Apple’s old programming language.

“I like the fact that the two (languages) can co-exist in the same app,” Simmons said. “So if there is some special feature in Objective-C that’s not in Swift that I actually need, then I can just use that if I need to. I don’t know if there will be anything like that, but it’s good to have that fallback.”

The language still has a few rough edges, though. For example, Seattle-based developer Wayne Bishop of Galleries HQ pointed out that Swift allows users to choose whether or not to end each of their code statements with a semicolon (a C and Objective-C staple), and said that could cause confusion.

“The lack of continuity could really trip up new developers or development teams,” he said in an e-mail to GeekWire.

But overall, Bishop said, “I am impressed with the language features and technology roadmap. Objective-C was widely known as a challenging, syntax heavy, ‘verbose’ language and lacked many of the features found in “modern” languages. This new language seems quick and efficient.”

All of these changes should make the Mac and iOS more appealing platforms for new developers interested in making their first apps for the iPhone or Mac. John Clem, who teaches iOS development for Code Fellows, said in an interview with GeekWire that he likes the idea of giving devs a fresh start with Swift.

John Clem
John Clem

“One of the kind of cool things about it is that everyone’s kind of starting at the same place,” Clem said. “Objective-C is so old that no matter when you learned it, if you’re under the age of 40, there’s someone out there who’s a much better expert in the specific area you’re working in.”

On the consumer side, users won’t notice much of a difference, if any, when developers start using Swift. Part of that is by design: Developers can compile Swift code alongside Objective-C, and both languages have access to the same frameworks. If a developer starts using Swift, users won’t know about it unless they’re told.

On the developer side of things, it will take a while for Swift to start making its way into applications people see. Apple won’t accept applications built with Swift into the iOS or Mac App Stores until after the release of iOS 8 and OS X Yosemite later this year. Some developers who are racing to implement new features in time for the launch of Apple’s new operating systems may choose to stick with the familiar Objective-C syntax they’re used to, and hold off on Swift development until later.

Even if people aren’t immediately programming in Swift, Clem said there’s a new energy to the Apple developer community.

“I think it is the best time ever to be an Apple developer,” Clem said. “There’s more momentum behind the platform, and more tools for creatively developing software.”

Comments

  • Floyd

    Checkout swiftprogramming.info for a comprehensive list of resources on Swift Programming.

  • BlueBoomPony

    Coder 1: Wait, do I need to end with a semicolon?
    Coder 2: Either way is good.
    Cider 1: K

    Yeah, mass confusion?

  • Tim Harkness

    From a non-coder, can I start to make an app by learning Swift only?
    I have zero knowledge of C or Objective-C.

    • Optymynd

      Yes. There will be some things not present in swift but you can. Of course, you’ll have to wait til osx Yosemite / iOS 8 to deploy to the App Store.

      • Tim Harkness

        Thank you! That gives me a few months to start learning.

  • Willaims Blom

    SWIFT has a darker intent behind it; to get new developers, especially web developers to quickly create apps that will boost the App Store traffic and ecosystem, while locking in these new developers to Apple platforms only. Otherwise Apple would have a picked one of the amazing modern languages already out there that is not proprietary to Apple.

  • iconoclast

    semicolons? seriously?

    Nice to have duck typing and closures.

  • Mike Albanese

    giving up strong typing is like not getting vaccinated against disease. you get away with it for a while but sooner or later it bites your ass. Try to write enterprise code in javascript in a team environment if you want a taste of horrors.

  • Usain

    Swift is easy to learn, I found all necessary resources on swiftlang.eu, plus a lot of video tutorials on their YouTube channel.

  • http://chester.millisock.com/ Chester Millisock Jr

    Shout out to whoever made that “sample Swift code” image for using the Firefly characters and their job titles :) Bonus points for using Mal’s jake about Jayne being hired onto the crew for public relations!

  • Robin

    I’ve looked at the syntax and I don’t like it at all. It looks so chaotic compared to C#.

  • PolyGon2013

    The little that I see in Swift will make me to start programming in Swift. It is clean and elegant. I hate Objective C.

  • ivan colasanti

    Swift is a very awesome language at first look! I am italian but the documentation of this language is in english only, so i have found this guide in italian language! http://www.programmareinswift.it !

Job Listings on GeekWork

Find more jobs on GeekWork. Employers, post a job here.