Return to site

14 Months on...

How am I finding Swift?

I know what you are all thinking and asking, 

How is Swift?

Well I have to say that it is a massive improvement on Objective-C, and this may come as no surprise to some but as a modern language it really is a step in the right direction.

It is faster, easier, and just improves you as a developer. I recommend it to every company I work for even if they have an existing Objective-C codebase, starting to develop now in Swift means that there are less bugs going into the code from this day forward. 

Some of the main differences that end users benefit from but act under the hood is the lack of dynamic run time in Swift. Objective-C always felt a little ‘hacky’ as you could cast anything to anything and make calls to objects and the compiler wouldn’t have a clue what is going on, so it would all pass and succeed building. 

Now I know what you are thinking… unit tests! Well I have worked on many codebases and unfortunately when time is critical the first thing that falls are the unit tests, whether this is right or not is a very different question. 

However this run time allowed quirky bugs, crashes and memory issues to crop up within code on modern devices. Of course if you knew the system well enough you could use this to your advantage and exploit it to some amazing feats of ‘magic’ coding.

Swift doesn’t have this, and so when you compile everything has to be type cast, with checks and double checks making sure it is the type you want, sure you can still crash it easily, but the tools are there for a good developer to make an app harder, better, faster, stronger. 

In short, I love Swift so much that I am surprised the take up on it has been as low as it has been within the iOS and MacOS community. Maybe some developers just don’t like change…