The continuously evolving world of computer programming and software development is in the midst of a paradigm shift. As programmers and developers adapt to the new programming language of Swift, the over 30 year old Objective-C is fading to iOS legacy.
In June of 2014, Apple, Inc. introduced Swift, a new programming language for all iOS and OS X applications. The new language is compatible with the ubiquitous Objective-C and was implemented to help developers get their apps to the market quickly and efficiently. It has taken hold as the go-to language for iOS and OS X as developers continue to unlock its’ full potential.
Apple has touted the code as fast, safe and interactive. In an attempt to make the change more manageable, Swift can be integrated into programs that were created in Objective-C. This co-integration should allow programmers to simply upgrade and update the code on an ad hoc basis rather than having to rewrite existing Objective-C code for apps already in development.
Swift has many advantages over Objective-C. Perhaps its’ most noteworthy is simplicity.
Swift requires significantly less coding for programmers. The framework is lighter and requires less files. Objective-C required headers and implementation files for every class in the code. In Swift, the only required file is a .swift.
Swift code is easier to write and easier to read. The language syntax is simpler and cleaner. This means coders can often accomplish the same result using less characters in their lines of code.
The shorter character length and condensed syntax leads to a shorter code overall and allows developers to write a generic code that, with only a few modifications, can do multiple functions. The ability to write a generic baseline in the code reduces the repetition and saves time.
Industry experts also believe that Swift is “safer” because it uses significantly less memory than code written in Objective C.
The new code is much more than a language, it includes tools that developers need to test and modify their applications while they are in development. The language includes an integrated development environment, or IDE. The IDE provides the platform developers need to actually write the code.
The initial response from developers, programmers and others in the industry was overwhelmingly positive and has helped make Swift a success. In Stack Overflow’s 2015 survey of coders from across the globe, a staggering 77% of respondents reported Swift as their “Most Loved” programming language.
As a result of the success of the Swift rollout and implementation, Objective-C has taken a severe dive in popularity. How precipitous that decline depends on the data source.
TIOBE and PYPL are 2 reliable sources of information when examining the popularity of software and programming code. The TIOBE Programming Community Index tracks the popularity of programming languages based on the number of lines of code that have been written. The PYPL Index ranks programming languages based on Google searches of their language tutorials and the raw data in trends.
In its October 2015 report, TIOBE ranked Objective-C at 14 and Swift at 15. Clearly the 2 are about equally popular, right? Not particularly. The overall rankings in TIOBE do not tell the full story.
Just a year prior, in the TIOBE October 2014 report, Objective-C was the 3rd most popular programming language in use. The drop to 14th overall this year represented a decline of 11 spots in the index. Objective-C lost its place in the Top 10, replaced by Ruby.
Pierre Carbonnelle, the owner of PYPL, dubbed Swift the 2014 language of the year. Swift currently ranks at no. 9 on list and is approaching 3% of the market share while trending up at a rate of .5%. Objective-C remains ahead of Swift at 5.3% of the market but is trending down at a rate of over 1% annually.
Clearly, coders have moved away from Objective-C in favor of Swift and as with any change, there are pros and cons to this new development.
Objective-C is not going anywhere. Not for a while.
Most example codes, shared among programmers all over, are written in Objective-C. Many in the industry may want to stick with what they know before attempting to write a code in the still relatively new Swift.
Also working against Swift is that it’s constantly being updated. Its more recent update was to version 2.0 in June 2015. With each update and revision, minor changes take place, which make it harder for programmers to completely learn the language and integrate it into new or existing apps.
The changing environment in programming language does not just impact programmers and developers.
Businesses are also impacted by the changing landscape. Many will not want to go back and update code for programs and software that already exists on Objective-C. Also, they may prefer to keep all company software in the same language. Creating new programs for a company that already uses Objective-C may mean all future projects are written in C, regardless of any advantages of Swift.
The Swift revolution should be a boon to new developers and programmers. Its simplicity should help young or novice programmers accelerate their learning curves. As more people enter the world of software development and programming, new and innovative software products will continue to flood the market and impact the daily lives of people all over the planet.
Apple’s introduction of a new coding language over a year ago may have been missed by most of the general public, but most of the general public will soon see the results of a transition in programming that is happening…Swift-ly.