Swift Introduction/Introduction

= Introduction =

What is Swift?
Swift is an open source programming language, introduced by Apple in 2014. It is used for their operating systems macOS for desktops and iOS for mobile devices, for instance iPhone or iPad. Since 2015 Swift has also been available on Linux under the Apache Licence 2.0. It is a modern language that includes multiple paradigms like object orientation, functional- and imperative programming. Apple included useful features from other languages like C#, Ruby, Python or Haskell.

Install
Before you can start with Swift, you first have to download and install the compiler and other components. Those can be downloaded from Swift's download page. On Linux, clang has to be installed too using following command: $ sudo apt-get install clang

IDE for Linux
Xcode is only available on macOS. However, there are alternatives which provide similar functionality:


 * JetBrain's CLion offeres a Swift extension which features code highlighting and completion and also a debugger.


 * The Open-Source Editor Atom offeres a plugin that works similar to Xcode's playground where you can easily try new code and immediatly see what it does.

First example
Before we dive right into Swift's basic and advanced features, let's have a look at the world-famous "Hello World" example. Now, let's have a first glance at what variables and constants look like.