Swift vs. Objective-C: 10 reasons the future favors Swift

It’s high time to make the switch to the more approachable, full-featured Swift for iOS and OS X app dev

Swift vs. Objective-C: 10 reasons the future favors Swift
Thinkstock

Programming languages don’t die easily, but development shops that cling to fading paradigms do. If you’re developing apps for mobile devices and you haven’t investigated Swift, take note: Swift will not only supplant Objective-C when it comes to developing apps for the Mac, iPhone, iPad, Apple Watch, and devices to come, but it will also replace C for embedded programming on Apple platforms.

Thanks to several key features, Swift has the potential to become the de-facto programming language for creating immersive, responsive, consumer-facing applications for years to come.

Apple appears to have big goals for Swift. It has optimized the compiler for performance and the language for development, and it alludes to Swift being “designed to scale from ‘hello, world’ to an entire operating system” in Swift’s documentation. While Apple hasn’t stated all its goals for the language yet, the launches of Xcode 6, Playgrounds, and Swift together signal Apple’s intent to make app development easier and more approachable than with any other development tool chain.

Here are 10 reasons to get ahead of the game by starting to work with Swift now.

1. Swift is easier to read

Objective-C suffers all the warts you’d expect from a language built on C. To differentiate keywords and types from C types, Objective-C introduced new keywords using the @ symbol. Because Swift isn’t built on C, it can unify all the keywords and remove the numerous @ symbols in front of every Objective-C type or object-related keyword.

Swift drops legacy conventions. Thus, you no longer need semicolons to end lines or parenthesis to surround conditional expressions inside if/else statements. Another large change is that method calls do not nest inside each other resulting in bracket hell—bye-bye, [[[ ]]]. Method and function calls in Swift use the industry-standard comma-separated list of parameters within parentheses. The result is a cleaner, more expressive language with a simplified syntax and grammar.

Swift code more closely resembles natural English, in addition to other modern popular programming languages. This readability makes it easier for existing programmers from JavaScript, Java, Python, C#, and C++ to adopt Swift into their tool chain—unlike the ugly duckling that was Objective-C.

1 2 Page 1
Page 1 of 2