Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

LABS
Summary of WWDC 2014 Keynote Announcements (Part 3)

In Part 3 of the WWDC 2014 blog series we cover perhaps the most significant announcement to developers: Swift. You can read about OS X and iOS 8 in Part 1 and Part 2, respectively.

Swift

Swift introduces several major improvements over Apple’s long-standing programming language, Objective-C. Swift is a simpler programming language featuring modern development capabilities including script-like syntax and type inference.

Swift reduces many of the syntactic complications found in Objective-C. For example, Objective-C already claims “string” for C Strings necessitating the use of @”string” to code text. Whereas C strings are removed from Swift altogether and thus a simple “string” can be used.  Swift also uses the generally popular v.m(a) syntax rather than [v m: a], closures use (a in b) rather than ^(a){ b }, and semicolons are optional. Swift has removed many of the unnecessarily complicated features of C, including pointers, header files, and pointer arithmetic. Arrays are now a class and no longer a wrapper on pointer arithmetic.

Strong, static, and inferred typing characterize development in the Swift language, which is a significant improvement over Objective-C. Objective-C typing is neither strong nor inferred and it also does not support the functional style of programming becoming increasingly popular within the software industry.

Swift includes many features common in the majority of new programming languages including tuple types, first class functions, closures, and higher-order functions, decent pattern matching, and enums. There are also many features that make coding safer including replacing null types with proper option types, and the ability to easily declare immutable variables, immutable properties and immutable datatypes.

For an example of using the powerful new features of Swift to simplify an existing Objective-C codebase and design pattern, look at this blogpost here.

Swift retains interoperability with Objective-C meaning it can work with apps already in Apple’s App Store. Objective-C libraries are also still intact and can be used with Swift, which should help ease the transition for individual developers.

WWDC 2014 opened with a video about some of the great apps being produced by the rapidly growing developer community. The changes outlined here demonstrate that Swift can reduce the current barriers to adoption found in Objective-C and potentially lead to even more developers building on on the platform.

Do you think Swift will attract more developers? Feel free to share your views in the comments below!

 

Comments
Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *