Apple recently announced a new programming language for iOS and OS-X app development – it has a nice name “Swift”.
As of now, the best source to know more about this programming language is Apple’s iBook – “The Swift Programming Language” downloadable from iTunes. Of course, very soon, we will find many books on Swift in market.
Developers who were writing programs using C# and Java have been reporting how difficult and time consuming it is to work with Objective-C. Actually, it was just the magic of elegant design of iPhones and iPads along with UI framework that supported iOS developers to write great apps. Underneath those great apps, there exist highly rudimentary, tiresome to write, difficult to read and analyze source code written in old age Objective-C programming language.
The best thing of Swift that I liked is its programming constructs are consistent with other advanced programming languages – C# and Java. Looks like Apple has realized that today’s typical developer just does not develop iOS applications – today a developer wants to develop apps for other platforms including Android and Windows. Gone are the days when a developer used to write programs in only one device and application platform throughout the life.
Playground is another interesting feature. Programmers frequently need to try a code block to test how effectively it works. A typical mechanism developers use is to create a very simple console app and run that in debug mode. Playground, integrated with Xcode, is very helpful in such scenarios. It allow developers to write code snippet and test it how it works as well as how it performs.
Let's expect new generation of app developers would prefer Swift and skills availability for Objective-C in market would go down.
Considering increased consistencies across major programming languages – expect new generation of app developers would have multi-platorm app development skills.
Is there code refactor or code conversion feature available for Objective-C to Swift? Not as of now, probably such feature might be available in future – but then let's not expect that code conversion to do all your job. Swift brings many new capabilities that have to be planned and implemented as per specific app requirements.
Sooner or later, all iOS developers will have to learn this new programming language. Existing iOS app developers should evaluate their apps and lifecycle to decide whether its source code should be converted to Swift. As a simple strategy – consider migration from Object C to Swift if iOS app is expected to continue serve beyond 2014.
Over 15 years of experience in in-depth programming, application architecture and design, solution deployments, complex technical troubleshooting, application performance analysis, code optimization, code analysis and reverse engineering, enterprise solution architecture, and enterprise wide technology strategy consulting.
Special interest in awareness of current market scenarios, industry trends, perspectives of industry leaders, effectively using technology to achieve business objectives, and communicate all this in easy to understand way to various stakeholders.