To Swift Or Not To Swift, Yet

Jul 9, 2014

It's not very often that a platform changes languages. During this intermediate timeframe where Swift, iOS and OSX are all in beta it's hard to tell how the future transition will take place.

If you are looking for a job in the Apple universe right now, as I will be shortly, it is tough to know which language to focus on.

On one hand the future is clearly going to be Swift, the language is modern, has lots of useful features, is likely to have good performance and Apple wants us to use it. In the short term however all apps are still written in Objective-C and most people are unlikely to rewrite them, or much of them, in Swift for quite some time.

For anything written new in the future focusing on iOS 8 and Yosemite it is the right thing to do. With the OS upgrades being free and supporting a decent set of hardware, past history shows that within the first 6-8 months after a major release 90% of the iOS users and at least 50% of the desktop users will upgrade. Unlike on other platforms Apple users tend to upgrade en masse.

A year ago we chose to write our new app for iOS 7 only between WWDC and September when it was released. It wasn't a big deal and by the end of the year most of the users were happily running iOS 7.X and running the new app. The decision of a year ago did internally create some discussion as our previous flagship app went back to iOS 4.3. But the numbers at the time showed 90%+ on iOS 6 so it seemed pointless to worry about reaching so far back. Choosing to focus only on iOS 7 for the new app made things much easier, although of course working with betas is always fun.

Not everyone has such great timing so reaching back might be necessary. With Apple always introducing new features that didn't exist in prior OS versions at some point you have to move forward or risk having your apps look and act dated. Apple will eventually refuse to even accept your apps if you don't go forward.

So if I focus only on Swift in the next couple of months I might have more difficulty getting someone to hire me for doing Objective-C. If I don't focus on Swift I run the risk of looking out of date. Personally over my 3 decades I've always erred on the side of the future which generally worked out pretty well.

In the coming year or so you will have to eventually use both depending on how advanced your employer is. Will Apple ever make Objective-C no longer a choice? I remember when most people used Pascal in the early days and many interfaces in Inside Macintosh were very much Pascal oriented. C rapidly became the standard and over time the Pascal-ness of MacOS generally disappeared. Not sure how this transition will occur this time.

During this beta period using a beta language with beta SDKs is hard since you don't know if you are doing it wrong or it's just a bug somewhere out of your control. Even in beta 3 Swift's arrays were rewritten so basic functionality it still a work in progress.

I'm trying to write a real app (2d game) in Swift so I can have something new out in September or October but of course beta development is a little "interesting".

The future is always unclear. Like weather forecasting, it's always easier to forecast today's weather today. In the long run you expect summer to be hotter (here in the US) and winter cooler. I can see Swift becoming the most common choice eventually but when is hard to predict.