Swift — Apple’s new programming language


Welcome to a revolutionary new programming language called Swift. I say revolutionary because it is the intersection of the performance of a compiled language (such as C) and the productivity of a scripting language (such as Python). Apple time and time again proving nothing is impossible if you are passionate about what you do. Swift really reflects the core values and the audacious mindset Steve Jobs had inculcated into his engineers.

Here are some of the important facts about Swift:

> Swift is an alternative programming language to Objective-C, a language that has been the main language for OS X and iOS operating systems.

> Swift is multi-paradigm, meaning it supports procedural, object-oriented, as well as functional programming styles.

> Swift has features like namespaces, closures, generics, categories, type inferences and more to enhance the quality and productivity of programming.

> Swift supports the use of protocols (aka interfaces). The concept of protocols is this: a class implements certain methods and other objects in the system can call those methods on any object that supports the protocol. In modern OO programming languages this technique is used as a substitute for multiple inheritance.

> Swift is native to Cocoa and Cocoa Touch the APIs to build applications for OS X and iOS.

> Swift uses the same runtime as the existing Objective-C system but requires iOS 7 / OS X 10.9 or higher. Swift and Objective-C code can be used in a single program, and by extension, C and C++ as well.

> Swift uses Automatic Reference Counting (ARC) to manage the memory. Pointers and other unsafe accessors are never exposed.

> Swift embraces the read-eval-print loop (REPL) philosophy for its development environment similar to Python and other scripting languages. But they have taken the REPL to a whole new level with the concept of playgrounds. 

Playgrounds‘ are interactive views running within the Xcode environment that respond to code or debugger changes on-the-fly. If the code in question changes over time or with regard to some other ranged input value, the view can be used with the Timeline Assistant to demonstrate the output in an animated fashion.

Apple claims that Swift “is the first industrial-quality systems programming language that is as expressive and enjoyable as a scripting language“.

Swift was introduced in Apple’s WWDC 2014.

About Deepak Devanand

Seeker of knowledge
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s