Official Page: Swift Language
Apple released Swift in mid 2014 and the aim was to ease the development process by introducing a language which is more readable, compiles faster and fun to work with. Some of its advantages are
Readable and Concise
- Readable code is easier to scan and comprehend. So in Swift
- Cleaner sytax for defining variables and blocks.
- Header files were removed and modules were introduced.
- Message passing syntax was removed.
- Type guessing was introduced. Objects now were able to guess their type when first initialised.
- Modules were auto imported.
- Better type safety.
- Better Memory Management.
- New types like tuples.
- New functional paradigms like extensions.
- Swift introduced Bridging headers which lets you include Objective C header files.
- Now you can use the Objective C libraries without waiting it to get rewritten in Swift.
- Converting large apps written in Objective C to Swift becomes smooth. You can iteratively convert your app to Swift.
- Apple boasts about Swift performance in terms of compile and run times.
- Swift project is now open source. This ensures that the language will evolve in a best possible way.
- Playgrounds were introduced by Apple which are self contained sandbox apps. You can test your code in a playgroud file and view the output on the fly without compiling the whole thing.
- As they are interactive, people have written books and tutorials on Swift using a single playground file.
- You can write your interactive app documentation there.
Cons are generally bugs which will get fixed over a period of time.
- Sometimes Xcode displays misleading errors and warnings.
- Third party apps need to support Swift.