Apple’s new Swift language

Swift Language

Apple has introduced a new programming language at WWDC14. The Swift Language has been years in the making. It combines the features of many other languages, including scripting languages. It has the potential to replace Objective-C as the primary development language on Apple devices.

I first used Objective-C back in the late 80s when I was writing my dissertation on a NeXT. I was delighted when Apple bought NeXT in 1996 and adopted their software. By that time, I was on to Java, but this kept me in the Objective-C camp. Over those years, I saw many improvements to Objective-C. Unfortunately, along with the improvements, there were many downright ugly contortions that the language needed to make in order to accomodate new features. Personally, I think OC jumped the shark with their closure (aka blocks) syntax. Even Java 8 did a better job with closures. So, the time had come to bring Apple development into the 21st century with a new language that was not burdened with OC’s backward compatibility problems.

To use Swift, you need to be a registered Apple developer in order to download the beta of XCode 6. I had let my account lapse, but this was enough for me to send another $99 to Apple.

Apple is making a book – The Swift Programming Language – available as a free download on iBooks. This is good. Already there is a flood of truly crappy “tutorials” and even worse screencasts, so we need something “definitive”.

I’m trodding through the book and playing with the language. I don’t think I want to add to the “crappy tutorial” flood, but perhaps it would be useful to post fairly short observations/snippets/tips as I go. If for nothing else, to remind myself of where the traps lie.

So, here we go.

First observation. The name. I’d really rather not have Taylor Swift take bandwidth from any of my synapses. Do a search for Swift and there she is. The good news is that they didn’t name the language “Bieber”.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.