2015-07-04

I don't understand why people seem to think that Swift is an easy language to learn. It isn't. Right now.

It's not the language so much. It's every version of Xcode has yet another new version of Swift which makes major changes. This means every time you look up how to do something on the web you get bad advice. It was good at the time but every couple of months most of the advice became obsolete. So the web fills up with things that don't work anymore which is terribly frustrating.

I saw one Stackoverflow post that was many lines of crossed out suggestions.

Of course when you watch Apple’s WWDC videos they make it all look so easy and slick. It’s easy for them, they can walk down the hall and ask how to do something, plus they probably share internally all sorts of useful knowledge and current bug lists. Those of us on the outside don't have anyone to ask except looking at the web, which is often obsolete. Apple’s demo folks also clearly know what to avoid since it doesn't work, another advantage we don't have.

Sure, it's an evolving language, and change is inevitable, but the necessary knowledge is so hard to come by, and often you have to unlearn something you just learned a couple months ago, so it’s tough to make any progress. Add to that the latest Swift 2.0 being in beta—really raw beta, where a playground dies every few minutes.

For the past two hours I've been trying to list files in a directory. So simple, but this has changed so many times in the past year I can't get it to list anything based on web suggestions and in the few minutes I get with a playground before Xcode locks up yet again.

I remember during the iOS 7 beta period we had major issues trying to build an app that Apple wanted to feature in the keynote. Each beta was pretty terrible and in the last month they released none. At least the language itself didn't change so we could do some development on iOS 6. In the end we managed to ship it on launch day by working hard over the weekend with the GM build.

There is zero reason to learn Swift 1.X now since the changes are so major. So I am pretty much stuck with trial and error which is really hard to build any kind of app in. Even the APIs I am familiar with in Objective-C are no help, since in Swift 2.0 Apple has used new language features to make their APIs better, which makes knowing what to call and how to call it really hard.

I supposed there is no fix for this given it’ so new, but it doesn't make Swift easy to learn at all. If it ever solidifies, perhaps it will be a nice language to for people to learn. I know this is the language of the future—I just wish it was here already so I could really learn it.

Chucking stuff around the room today in frustration does not actually help anything but sure is easy to do. Hopefully soon I can do more Swift and less damage!

Show more