You’re My Favorite Waste of Time

This song from Paul Owens released somewhere around 1986 summarizes very well what Swift means to a lot of developers today. This is a subtle way of suggesting that Swift in it’s evolutionary phase is a bit difficult to work with. It would still be fine if the updates and changes were a year down the track or so. The updates are essential to making things work with the platforms but it is taking a lot from developers in terms of time.

Learning

You are all individuals. – Brian, Life of Brian

Therefore, each one takes their own time in understanding how things work. Some can afford to allocate a lot of time playing with the latest release (hot off the download) maybe to tweet about it first or simply to learn about the new features. However the majority take time to catch up and by the time there are articles, posts, tweets about the new features and how it will alter humanity and result in a wonderful future, a new release is posted and while it is expected that it could have more features, it simply changes the syntax and/or the concept.

Isn’t that good?

It may be good for the end user that would probably search stack-overflow for answers or eventually jump onto the platform when it is stabilized probably like when it reaches version 4.2 or something. That is when it might start to make sense to many. Let me share one of the largest issues that I faced personally.

I had commenced writing a couple of books on Swift when it was in version 0.8 The first few chapters were written and uploaded to the publisher for review. They had their process and they found reviewer(s), however the time it took for them to find a reviewer and provide the chapters to them for reviewing Swift 1.0 was released. You can imagine, the reviewers started raising flags, the code does not work and the code is wrong, etc. One of the reviewers missed to even comprehend that the text was written about 2/3 months earlier and had his take and advice, which was quite frustrating. Anyways, the books were published (by two different publishers) and Swift 1.2 was released. Now it was the readers, when they picked up the book and typed the code, it did not wok for them.

The change from Swift 0.8 to 1.0 was subtle and did not break things much, however from 1.0 to 1.2, was radical. It introduced the as! and as?, all of the function headers had a bit of an issue, specially when working with UITableViews and worse still with CoreDate related code. It was not pretty, the swift converter was
even worse and coupled with the cryptic error messages the compiler could throw at you, it was a nightmare.

Updated the code for the samples and uploaded them to GitHub and the publishers website, Apple release Swift 2.0 and everything starts to break AGAIN!! Luckily this time this is still in Beta and not deployed to the masses.

Keeping up with the Car-Crash-ians

The Swift updates are like a car crash at the same time they are exciting because Swift is actually changing the way you would look at programming. In the past enums were simply index (numeric values) and used instead of constants. Unions were part of structures which are what are called associated values with enums. Swift 2.0 introduced Protocol extension which is something that a beginner cannot even start to understand, and for a seasonsed developer exploring the features added is like Christmas coming early.

Can you make apps for the app store with Swift?

Well as it stands today at Swift 1.2, yes you can. You do not need to wait for SWift 2.0 or higher to be able to create apps and post them on the App store.

What are the uses of Swift as of today

From what I see as of today, Swift is more of an academic interest given it’s close association and inclination for functional programming. Playgrounds alow for quick teaching and learning (classroom) scenarios and can help visualise code interactively. While it does all of this, in a very broad sense, it has Objective-C bindings and allows you to use Objective-C classes to create apps. When it will be open-sourced, there might be more bindings so you could use .Net bindings, or QT bindings and so on.

Paul Owen

Paul Owens is the singer for this lovely song that inspired the title for this post. This was a song that I recollect playing on the walkman and listening to quite often.

Views All Time
Views All Time
1282
Views Today
Views Today
1
Posted in Basics.