Have Fun With Apple's Swift Programming Language

The Playgrounds in Swift Are Just Too Much Fun

Xcode icon
Give the Swift programming language and Xcode a try. Courtesy of Apple

Apple rolled out the Swift programming language at the WWDC 2014 event. Swift was designed to eventually replace Objective-C, and provide a unified development environment for those who create apps for both the Mac and iOS devices.

Since the initial announcement of Swift, the new language has already seen a number of updates. It now incorporates support for watchOS as well as tvOS, letting you develop for the full gamut of Apple devices from a single development environment.

During the summer of 2014, I downloaded the original beta version of Swift that was available to Apple developers. This is a brief look at what I found, and a few recommendations for how to proceed if you’re interested in learning Swift.

The Summer of 2014

Earlier in the week, I finally got around to downloading the beta version of Xcode 6 from the Apple Developer website. Xcode, Apple's IDE (Integrated Development Environment) contains everything needed to develop apps for the Mac or iOS devices. You can actually use Xcode for many different development projects, but for Mac users, creating Mac and iOS apps are the biggies.

Xcode, as always, is free. You do need an Apple ID, which most Mac and iOS users already have, but you don't need to be a paying member of the Apple Developer community. Anyone with an Apple ID can download and use the Xcode IDE.

Be sure to select the Xcode 6 beta, because it includes the Swift language.

A word of warning: the file is large (approximately 2.6 GB), and downloading files from the Apple Developer site is a notoriously slow process.

Once I installed Xcode 6 beta, I went looking for Swift language guides and tutorials. My programming experience goes back to assembly language for Motorola and Intel processors, and a bit of C for some development projects; later, I fooled around with Objective-C, just for my own amusement.

So, I was looking forward to ​seeing what Swift has to offer.

As I mentioned, I searched for Swift tutorials, guides, and references. While I found many sites that provide Swift guidance, I decided, for no particular reason, that the list below was where I would start.

Swift Language Guides

After rereading the Swift Programming Language iBook (I actually read the iBook when it first came out in June), I decided to jump to Ray Wenderlich's quick start guide and work my way through his tutorial on Swift basics. I like his guide and I think it's a good place for a beginner who has little, if any, programming experience to start. Although I have a decent background in development, it's from a time long ago, and a little refresher was just the ticket before moving on to the Apple guides and references.

I haven't created any apps with Swift yet, and in all probability, I never will. I just like keeping up with the current state of development. What I found in Swift was pretty amazing. The Xcode 6 beta itself was fabulous, with the Playgrounds feature that works with Swift. Playgrounds allow you to try out the Swift code you write, with the results, line by line, displayed in the Playgrounds. What can I say; I liked the Playgrounds; the ability to get feedback as you're writing your code is pretty amazing.

If you've been tempted to try your hand at a bit of development, I highly recommend Xcode and Swift.

Give them a shot, and have some fun.

Updates:

The Swift programming language is up to version 2.1 at the time of this update. Along with the new version, Apple released Swift as an open source programming language, with ports available for Linux, OS X, and iOS. The open source Swift language includes the Swift compiler and standard libraries.

Also seeing an update is Xcode, which advanced to version 7.3. I've checked all of the references in this article, which originally looked at the first beta version of Swift. All of the reference material remains current and applies to the latest version of Swift.

So, as I said in the summer of 2014, take Swift out to the playground; I think you're going to really like this new programming language.

Published: 8/20/2014

Updated: 4/5/2015