The Media was waiting for Apple to have some jaw dropping bomb of an announcement at WWDC2014, expecting some miraculous hardware like a watch or teleportation device for the iPhone. What they got in classic Apple form was totally unexpected — a new programming language, Swift. At the keynote, application developers cheered many of the new features of the language. Many appeared scared out of their minds to learn something new. Apple went one step further: They published a book The Swift Programming Language as an iBook. what I didn’t know that Monday during the WWDC keynote was they published the book publicly.
As a developer, I am bound by Apple’s non disclosure agreement to not reveal anything until Apple releases a technology to the public. I thought Apple published the iBook only to developers, much like they do WWDC videos. By publishing the book publicly, I am not bound by that agreement.
As an educator, I have a passion for teaching new people how to do something. Apple wrote this book far more for developers who already know an object-oriented language. It is a very well written manual, but it is still a manual. For a total beginner and for many developers it is a difficult learning curve. If there is any great introductory language for coding, it would be Swift. Unlike some introductory languages though, Swift is powerful enough to create full applications as learners advance. For some developers, reading a different learing method than the one used in the iBook will be helpful. I’m going to start a series on Swift to introduce to intermediate and beginning programmers the rather remarkable language Apple has wrought.
I can talk about Swift, but I can’t show you the development environment since they are still covered by the non-disclosure agreement. There is so much to cover without them, we will have a while before that will show up as an issue — with one exception.
In order to run Swift programs, Apple encourages the use of playgrounds. Playgrounds are interactive environments where the developer can see what changes with each line of code. I’ve gotten playgrounds to work sometimes, and they do make experimental coding fun and interesting. As playgrounds are still in beta, how much of playgrounds is public knowledge is hard to tell, and so I’ll use a more traditional approach to write my code. For those familiar with Xcode, I will use a single view template set to Swift, and start all my code in the
viewDidLoad() method. For those who have no idea what I’m talking about, don’t worry. Once I give a few basic concepts, we’ll set up a application.
We’re going to have an interesting adventure here at makeAppPie.com, and next time we’ll start with constants and comments.