top of page
  • Writer's pictureLungtreater

Apple replaces 21 years-old Objective-C with Swift

Our Chief Technologist, Johnny Chan outlines these changes in this article.



It seems the more general public was quite disappointed about WWDC this year. Surprisingly, there were no new hardware product announcements—no iPhone 6, no iWatch, not even a MacBook upgrade.


However, we must keep in mind that WWDC is an annual gathering of Apple developers from all over the world. Speaking as a software architect myself, the true audiences of WWDC 2014 are iOS and OS X developers. The launch of Swift, a brand new programming language, and Playground, the interactive real-time development environment for Cocoa and Cocoa Touch, proves that Apple wants to dramatically reshape its software ecosystem.


Objective-C is 21 years old

To help put things in context, let’s look back to the development of Objective-C. By the early 1980’s, Object-oriented programming had become hugely popular in academia. In 1983, AT&T’s Bell Lab developed a new object-oriented language based on the popular C called C with Classes, which was later rename C++. Sharing the same vision, Objective C was created in the same year by Cox and Love.

After Steve Jobs had been fired from Apple in 1985, to continue his quest for the next-generation computer platform, he immediately went about fashioning NeXT. And, in developing NeXT, he bought Stepstone company and Objective-C from Cox and Love. After Jobs’ returned to Apple in 1996, the whole NeXT platform, including Objective-C, was brought in as the technical foundation of OS X and iOS. Over the past two decades, Apple has added many features in OS X, iOS and Objective-C, yet the essence of the programming language has remained unchanged.


Swift: Supercharged Python for Cocoa

In the meantime, elsewhere in the computer science world, innovation has continued. Powerful and intelligent languages like Python and Ruby emerged. And, there was a significant commonality in these new languages: They had moved away from functional programming paradigm with complex framework built-in.

In response to these innovations, with the introduction of Swift and Playground, Apple made a bold statement in WWDC 2014, while courageously taking a risk on its programming front. In diverging from the traditional functional language—the so-called “baggage of C” or, for that matter, Java—Apple is taking the plunge into improving its programming language. The syntax of Swift looks a lot like JavaScript. Its powerful capability to work with Apple’s model-view-control framework, Cocoa and Cocoa Touch, respectively, is similar to modern languages like Python. The release of Swift takes back its brand image of cutting-edge innovation and intuitive design.


Playground for Animation Programming

To make this programming experience fast, fun and vivid for Coders and non-Coders alike, Apple needed an interactive, real-time, “living” development environment. In this way, all developers can program and see the output immediately. Swift, combined with Playground, cuts down on the coding complexity and allows coders to view their results even as they are coding. This new found clarity, coupled with its elimination of historically common Objective-C coding errors and its automatic riddance of any unnecessary information in the computer’s memory, makes the debugging experience much easier to manage.

Another driving force behind Apple’s newest coding innovations comes from the popularity of animation programming. Touch screen-based mobile devices have drastically changed the user-experience design. Today, more and more apps are using animation to deliver superior user experience. For many, it has been painful to use C or Java for animation programming. Suffice to say, developers needed a better and faster language, as well as development tools for animation programming. Apple’s Swift and Playground provide for this type of coding quite nicely.


Swift and Playground drive Apple to New Heights

Put simply, Apple wants to introduce this new way of programming to even its non-coders, potentially turning them ALL into app developers. Thus, the introduction of Swift and Playground will definitely push the industry forward. In response, surely, Google and Microsoft will cook up their own version of Swift and Playground.


Thirty-eight years ago, when Jobs and Wozniak released the Apple 1, they introduced Integer BASIC and expected that all users could use it for programming. In 2014, Apple is reorienting the idea of coding, taking it back to its intuitively-useable roots. You will be able to see your program coding “live” and act in real-time even as you code. Such tools will not only bring more non-traditional coders on-board, but will reshape our next generation of programmers to spend less time on learning syntax but more time on finding real-life solutions to problems, scientific discovery, and other challenges.

In my humble opinion, the most exciting news in WWDC 2014 was not HealthKit or HomeKit, Continuity or Adaptive Design, or iBeacon or Multipeer Networking, but the launch of Swift and Playground. Undeniably, it signifies that Apple is committed to investing in their next generation technologies, thereby, keeping their ecosystem alive and competitive.

3 views0 comments

Comments


bottom of page