[alert variation=”alert-info”]Grab a copy of Apple’s free Swift programming book on the iBooks store[/alert]
At the 2014 WWDC, Apple announced a new programming language called Swift. With inferred types, simple syntax, and an interactive editor (“playground”), it is easier to learn than its predecessor, Objective-C. Also, is offers performance enhancements over alternative languages. But will Swift have a drastic effect on the iOS and Mac application development process?
The transition between programming languages will be long or nonexistent, as Objective-C is backed by thousands of libraries and frameworks. Furthermore, programs and apps written in Objective-C are expensive to rewrite, and many developers will choose to continue to update old code rather than opt to rewrite it in Swift. Plus, Swift and Objective-C can live together in the same applications, as Apple was careful to point out. This means Objective-C can stick around and do the more rigorous work while Swift handles the interface or user interactions of an application.
Objective-C has it’s fair share of quirks, but Swift’s are worse. Although faster to write and shorter, Swift supports poor/lazy programming practices with every class being public, inferred types, and the absence of semicolons. Developers in teams will have to implement rigorous coding standards to avoid illegible and buggy code. Swift helps with this in some aspects, however, with mandatory brackets around conditional statements and single type arrays.
In most cases, iOS and Mac development will remain the same. Because Swift is so closely related to Objective-C to the point that the two languages can run together, developers can continue to program in Objective-C. More adventurous developers will continue to use the same IDE and even the same libraries in their Swift applications. There isn’t a major shift.
Since Swift is a developing language, developers will have the unique experience of giving feedback to Apple that will effectively shape the language for the future. As it is in development, though, there are many bugs and crashes to be endured. Despite this, developers should play with the language and help improve it for their own benefit.