Pinterest Stumbleupon Whatsapp
Ads by Google

Apple’s new programming language for iOS and OS X will fundamentally change how developers create the applications we love, and lowers the barrier to entry for people looking to get started with developing apps.

Swift, as it is known, was announced at the 2014 Worldwide Developer Conference and received a rapturous applause from the audience. From the get-go, developers knew this was going to be big. But why should you care?

There are three main groups that will benefit from Swift being around: developers, students and consumers.

Developers

“What would it be like if we had Objective-C without the baggage of C? We did more than think about it. We have a new programming language. It’s called Swift, and it totally rules”

One can only assume that when Craig Federighi announced Swift, he first mentioned the one thing that developers are sure to love.

For the longest time now, the given way to develop native iOS applications was with C, C++ or Objective-C – the language that was developed in-house by Apple in 1983. Objective-C inherited a lot of baggage from C and C++, although added Smalltalk-type messaging and a way to do object oriented programming that was slightly more approachable than C++.

Ads by Google

As a result, developing Objective-C applications is significantly harder than what it is when using a modern language such as Python, Ruby and the popular JavaScript preprocessor CoffeeScript CoffeeScript Is JavaScript Without The Headaches CoffeeScript Is JavaScript Without The Headaches I've never really liked writing JavaScript all that much. From the day I wrote my first line using it, I've always resented that whatever I write in it always ends up looking like a Jackson... Read More .

However, where Objective-C falls down with respect to pure developer productivity, it more than makes up for it in sheer developer community. I’ll be blunt. Objective-C is an insanely fast language, with the code being compiled down to highly optimized bytecode.

Swift happens to be a nice happy-medium between the sheer speed of Objective-C and the development loveliness of a modern interpreted language. A lot of the bulk of Objective-C is removed. There’s no longer a need to define whether a variable is an integer or a character, and manually managing the computer’s memory with pointers is heavily discouraged.

swift-c

Furthermore, Swift allows developers to accomplished tasks with a a variety of programming styles. These include functional programming, where everything is treated as a mathematical calculation; procedural, where tasks are accomplished sequentially and linearly; and object oriented, where data is represented as real-life objects.

You can start using Swift, since Swift produces highly optimized LLVM compatible bytecode (the instructions that are executed on the device) and accesses the same APIs that one would use with Objective-C and C. You can integrate Swift code with existing projects, libraries and applications. And if you find yourself needing to go down a level and manually manage your own memory, you can still fall back to Objective-C.

As a developer, I know how fun it is to play with a new language, framework or API. Despite that, I feel that Swift is more than just a toy language. I feel it will fundamentally change how applications are developed.

Students

In years to come, we may see the common ‘Hello World’ application replaced with a Swift app. Why do I think this? Because Swift is a beautiful, intuitive take on application development.

We’ve already talked about how Swift is syntactically lovely. We’ve also talked about how Swift retains the sheer ludicrous speed of Objective-C. These alone will make Swift a compelling choice for programming students. But we’ve not talked about Playgrounds.

First we need to talk about what a REPL is. This acronym stands for Read, Eval, Print, Loop, and refers to the ability to write code and interpret it line by line. This is handy when you’re testing an individual section of your code or an idea without having to run an entire project.

swift-playgrounds

Playgrounds are a feature in Xcode 6 that allow you to interpretively run through an application, and see how it would work, step by step. This makes learning app development significantly easier, as applications become easier to debug, and the development process comes with real-time feedback on how a section of logic works.

Swift precipitously drops the barrier of entry for learning to develop applications, and for this Apple is to be commended.

Consumers

This one is tricky. Most application users aren’t developers, and don’t care about programming languages. Provided the applications do what they are told, reliably, most consumers are happy.

swift-flap

The introduction of Swift will have major repercussions for the Apple application ecosystem. As app development becomes easier and easier, developers for other languages will be tempted to start building applications for the iPhone and iPad. But what does this mean?

Firstly, more developers are going to be attracted to the platform. More developers means more applications, and more variety in the applications available. What this means for the quality of the applications, however, remains to be seen. Swift is a very new technology, and it is one that isn’t fully understood by developers. Furthermore, it’s one that is fundamentally more accessible to novice and beginner developers. Whether this is a double-edged sword remains to be seen.

Not Convinced?

Remember FlappyBird The Short Story Of Flappy Bird [Weird & Wonderful Web] The Short Story Of Flappy Bird [Weird & Wonderful Web] Few mobile games enter into the collective consciousness of the mainstream in the way Flappy Bird has done. It passes into Internet folklore, but these videos will help to preserve its virality. Read More ? In the days following the launch of Swift, someone reimplimented it in its entirety in Apple’s confident new language in the form of FlappySwift. Seriously.

If you’re not sure why Swift is nothing short of revolutionary, have a look at the source code on Github. Look at how much it resembles a modern interpreted language. Look at how few lines of code there are and how clean and easy to read everything is.

Want to get started with Swift? Unfortunately, you’re going to need a copy of the Xcode 6 beta. This requires an Apple developer account, costing $99. Failing that, you can wait until fall 2014 when the latest version of Xcode is released to the general public.

  1. Ukaza P
    July 13, 2014 at 6:48 am

    No new stuff here, everything's already implemented in other languages and IDEs. Awesome.

    • Matthew H
      July 18, 2014 at 3:31 pm

      Really? Being able to write bare-metal (or, at least VM bytecode-level) applications in a language that resembles Javascript and Python, with a LightTable-like REPL isn't new?

    • Ukaza P
      July 21, 2014 at 9:17 am
  2. Rob
    July 10, 2014 at 12:04 pm

    As a long-time Java/Eclipse/Web engineer, I've dabbled with Objective-C in creating basic iPhone apps so I'm really looking forward to trying out XCode with Swift.

    • Matthew H
      July 18, 2014 at 3:28 pm

      Me too man. It'll be massively different to Java though. It's a bit of a hybrid between Ruby, Python and Javascript. Interesting stuff.

  3. Bud
    July 9, 2014 at 3:13 pm

    Great for the programming geeks, but for Joe Consumer ? Who cares as long as it RUNS well!

    • Matthew H
      July 18, 2014 at 3:27 pm

      I think the consumer could benefit from more applications, and more developers in the ecosystem. Apps are hugely important to the user experience, IMHO.

  4. John
    July 8, 2014 at 6:50 pm

    Apple created Objective-C? http://en.wikipedia.org/wiki/Stepstone

    • Matthew H
      July 18, 2014 at 3:33 pm

      Ah, good catch.

    • Rama Krishna Reddy S
      September 10, 2014 at 5:09 pm

      The language is Objective -C 2.0(adding more language features like blocks,kind of garbage collection and many more) by Apple and Objective -C when developed in stepstone

Leave a Reply

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