Should I Learn the New Programming Language, Swift?

swift

Last Week Apple announced the release of a brand new language called Swift. This is a paradigm shift and one that was desperately needed by the community. Objective-C is a relic of the past which was showing its age. Apple has been trying to update the language but it had a long way to go. With Swift they made a clean break. Now we get a modern language that has features found in languages like Ruby, Python, Go, etc.

Here are some of the highlights of the language according to Apple:

Closures
Tuples and multiple return values
Generics
Enums and Structs
Optional chaining
These are some advanced features for a language that looks deceptively easy to learn. Swift is not just new syntax but it’s a completely new language from the ground up.

We’ve received several emails and tweets with questions about Swift. This post will try to address most of those questions. Feel free to ask any other questions that I may have missed.

Q. When will Treehouse have a course on Swift?

A. Apple has a Non-Disclosure Agreement (NDA) on all new technologies they announce at WWDC, which means nobody can publicly talk about them until the official release of iOS in the fall. We could have a course ‘swiftly’, however if it falls under the NDA then we can’t release it until the public release of iOS.

Apple has released a book on Swift and our guess is that the language might be exempt from the NDA but not the tools. We cannot teach the language without being able to use the tool (Xcode). We are trying to get the official word from Apple.

Q. I just started learning Objective-C, should I just learn Swift instead?

A. As mentioned above, Apple has released a comprehensive Swift book so by all means start learning Swift. After glancing through the book I believe that on some levels Swift may be harder to learn because of the advanced features mentioned above. My suggestion would be to continue learning Objective-C, although it may look difficult syntactically but conceptually it’s a much simpler language and great for a beginner. Once you get the hang of Objective-C then switching over to Swift will be a lot easier because the two languages are quite similar.

Q. Will Swift take over Objective-C?

A. For now, Apple is supporting both the languages so Objective-C is not going anywhere. There are 1.2 million apps in the App Store and I’m pretty sure majority of them are written in Objective-C. Rest assured, if you are looking for a job then most probably your future employer has an existing app that is written in Objective-C which you will have to learn inevitably.

Eventually, developers will start switching over to Swift and you will see a wider adoption of the language but do not expect existing projects to completely overhaul their apps to use the new language. Swift is here to stay and Objective-C will ride into the sunset but this whole process will take a while.

Leave a Reply

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