Learning the Swift Programming Language

If you’d like to get to it, download the sample code, and get hacking!

Swift is the future for Apple engineers and third parties. The great thing about new programming languages is that they usually improve upon their predecessors. Swift is no exception.

Learning a new language can prove to be a momentous task. Especially if you have never experienced learning a new language before. Approaches to learning differ from person to person, but throughout history a maxim has emerged.

“See One, Do One, Teach One”

I plan on posting example solutions as I happen upon them. If you’d like me to notify you click here and drop me your best email.

So what is Swift exactly? It is a compiled multi-paradigm programming language created by Apple for iOS and OS X. Basically, if Bruce Lee were a programmer, this is what he would of invented. It uses the best concepts from other languages and throws out the useless bits.

My first impression, coming from an objective-c background, was that it was awesome I didn’t have to keep track of separate header and implementation files.

Also, not having to type a semi-colon at the end of each statement.

var sortedStrings = sorted(stringArray) {
$0.uppercaseString < $1.uppercaseString

And no longer having to import every file as long as it is in the same module. Shout out to all you .pch lovers out there!

Obviously, it was the simple stuff for me. But as you dive further into the language you can really start to see it’s flexibility. So let’s cut the chat and dive in.

Apple has a huge number of resources you can start with listed here — Swift Resources. But I recommend downloading my playground file and following along with the Introduction to Swift — WWDC 2014 video.

Playground file includes examples for each.

If you have any questions you can reach me @iJoeCollins on twitter.

Please recommend this post and subscribe to my newsletter!