A file with .swift extension refers to SWIFT programming language introduced by Apple for writing software applications and apps for macOS, iOS, tvOS and beyond. Before SWIFT, Objective-C was the prime programming language for writing applications. It can be used with Xcode which is a complete developer toolset for creating apps for Mac, iPhone, iPad, Apple Watch, and Apple TV. SWIFT is more powerful, interactive, expressive, and offers more safety by design without compromising on performance. Swift files can be opened for editing in any text editor in addition to Apple Xcode. It supports Apple’s operating systems, Linux, Windows, and Android.
Development started in mid 2010 by Chris Lattner with contribution of other programmers from Apple
First official app written in SWIFT was released on Jun 02, 2014 at Apple WorldWide Developer Conference (WWDC) and a Beta version of the language was released to registered Apple developers
Swift 1.0 was released on Sep 9, 2014 with Xcode of iOS
Swift 1.1 was released on October 22, 2014, with the launch of Xcode 6.1
Swift 1.2 was released on April 8, 2015, along with Xcode 6.3
Swift 2.0 was announced at WWDC 2015, and was made available for publishing apps in the App Store in September 21, 2015.
Swift 3.0 was released on September 13, 2016.
Swift 4.0 was released on September 19, 2017.
Swift 4.1 was released on March 29, 2018.
Swift language was open-sourced on Dec 3, 2015 along with its supporting libraries, debugger, and package manager under the Apache 2.0 license. The project was hosted at Swift.org and its source code is hosted on GitHub.
During WWDC 2019, Apple announced SwiftUI framework for UI structure design across all Apple platforms
Swift File Format
Swift files are plain text files that can be opened with any text editor. The primary text editor used to open and edit swift files is Apple’s Xcode. Many parts of Swift are familiar with application developing using C and Objective-C. The Swift documentation provides detailed application development guide for writing code using Swift.
Swift Language Features
Swift is distinguished from other program languages based on following features.
Modern - Named parameters are expressed in a clean syntax that makes APIs in Swift even easier to read and maintain. Even better, you don’t even need to type semi-colons.
Safety - Variables are always initialized before use, arrays and integers are checked for overflow, memory is automatically managed, and enforcement of exclusive access to memory guards against many programming mistakes.
Fast and Powerful - Using the incredibly high-performance LLVM compiler technology, Swift code is transformed into optimized native code that gets the most out of modern hardware.
Source and Binary Compatibility - Applications developed with previous version of Swift are compatible with new releases and source code does not need to be recompiled. With launch of Swift 5, Swift libraries are included in every OS release going forward. This avoids inclusion of Swift libraries in the apps that target current and future OS releases.
Open Source - Swift is open source with hundreds of contribution from Swift Community members. It is backed by strong bug tracker, forums and regular development builds that are publicly available for everyone.