Almost a year ago, Apple announced a hot new programming language called Swift. It was announced at WWDC 2014 so it is clear that Apple wants to attract more developers to its already rich ecosystem. It isn’t exactly something that all developers asked because many of them are doing fine with Objective-C – the primary language for iOS apps. In fact, developers still use Objective-C today because Apple currently allows it even though the company is recommending Swift. But before you be part of the next generation of developers, understand these pros and cons first.
Pros
Better Long-term Support
Apple went as far as designing a logo and marketable name for its new programming language. Consider that a solid sign that Apple is going to carry the Swift banner for the unforeseeable future. Even though Apple insists Objective-C isn’t going nowhere, Swift is still an evolving animal and once more developers start relying on it, the support of Objective-C could fade away.
Friendly for Beginners
There are several programming languages that are easy to learn but Objective-C definitely isn’t one of them. Even though developers have made some powerful apps with the aging language, dealing working with the code can be a pain for beginners. Swift is Apple’s direct solution to the problem and it is indeed easier to code with. If you can learn JavaScript or Ruby, you definitely have a chance with Swift. It is also less likely for developers to make unsafe apps due to Swift’s safe design approach.
Optimized App Performance
Like Objective-C, Swift uses the LLVM compiler but since you it takes fewer lines of code to make a particular app compared to Objective-C, you can expect some nice performance benefits. Object sorting is considerably quicker than Objective-C and noticeably faster than Python.
Despite these great advantages, Swift might not be a solid choice for everyone. Find out why in the next article that will discuss the cons of going with this language.