Swift is a programming language developed by Apple and used for its operating systems.

Designed for use with macOS, iOS, watchOS, and tvOS, the general purpose, multi paradigm, compiled language is designed to work with the company’s Cocoa and Cocoa Touch frameworks and the large body of extant Objective-C code written for Apple products.

The language first appeared in 2014 and supports the core concepts that made Objective-C flexible, most notably dynamic dispatch, widespread late binding, extensible programming and other similar features.

 

What are the differences between Swift and Objective-C?

Swift, by default, does not expose pointers and other unsafe accessors, unlike Objective-C, which uses pointers pervasively to refer to object instances. Another difference from Objective-C is that the use of a Smalltalk-like syntax for making method calls has been replaced with a dot-notation style and namespace system.

This style is more similar to programmers that use other common object-oriented languages such as Java or C#.

Apple recently added option types as a new feature for Swift, this allows references or values to operate in a manner similar to the common pattern in C.