Shift your programming to “Swift”

untitled-infographic (33)
*Swift is easier to read
* Swift is easier to maintain
*Swift is safer
*Swift is unified with memory management
*Swift requires less code
*Swift is faster
* Fewer name collisions with open source projects
*Swift supports dynamic libraries
*Swift Playgrounds encourages interactive coding
*Swift is a future you can influence

Swift is easier to read and write:
Swift code more closely resembles natural English, in addition to other modern popular programming languages. This readability makes it easier for existing programmers from JavaScript, Java, Python, C#, and C++ to adopt Swift into their tool chain — unlike the ugly duckling that was Objective-C.

Swift is easier to maintain :

Xcode and the LLVM compiler can do work behind the scenes to reduce the workload on the programmer. With Swift, programmers do less bookkeeping and can spend more time creating app logic. Swift cuts out boilerplate work and improves the quality of code, comments, and features that are supported.

Swift is safer

To provide predictable behavior Swift triggers a runtime crash if a nil optional variable is used. This crash provides consistent behavior, which eases the bug-fixing process because it forces the programmer to fix the issue right away. The Swift runtime crash will stop on the line of code where a nil optional variable has been used. This means the bug will be fixed sooner or avoided entirely in Swift code.

Swift is unified with memory management
Automatic and high-performance memory management is a problem that has been solved, and Apple has proven it can increase productivity. The other side effect is that both Objective-C and Swift do not suffer from a Garbage Collector running cleaning up for unused memory, like Java, Go, or C#.

Swift requires less code

With Objective-C, messing up the order or using the wrong string token causes the app to crash. Here, Swift again relieves you from bookkeeping work, translating into less code to write (code that is now less error prone) because of its inline support for manipulating text strings and data.

Swift is faster

Dropping legacy C conventions has greatly improved Swift under the hood. Benchmarks for Swift code performance continue to point to Apple’s dedication to improving the speed at which Swift can run app logic.

Swift is nearly on par with C++ for both the FFT and Mandelbrot algorithms. According to Primate Labs, the GEMM algorithm performance suggests the Swift compiler cannot vectorize code the C++ compiler can — an easy performance gain that could be achieved in the next version of Swift.
 Fewer name collisions with open source projects

With Swift, namespaces are based on the target that a code file belongs to. This means programmers can differentiate classes or values using the namespace identifier. This change in Swift is huge. It greatly facilitates incorporating open source projects, frameworks, and libraries into your code. The namespaces enable different software companies to create the same code filenames without worrying about collisions when integrating open source projects. Now both Facebook and Apple can use an object code file called FlyingCar.swift without any errors or build failures.
Swift supports dynamic libraries

The ability to defer loading in a mobile app or an embedded app on Apple Watch will improve the perceived performance to the user. This is one of the distinctions that make the iOS ecosystem feel more responsive. Apple has been focused on loading only assets, resources, and now compiled and linked code on the fly. The on-the-fly loading reduces initial wait times until a resource is actually needed to display on the screen.
Swift Playgrounds encourages interactive coding

Swift’s newly introduced Playgrounds are a boon to experienced developers. The Playgrounds were partially inspired by the work of former Apple employee Brett Victor. Playgrounds enable programmers to test out a new algorithm or graphics routine, say 5 to 20 lines of code, without having to create an entire iPhone app

Swift is a future you can influence

Apple is focused on providing the best consumer experience and is building only those features deemed worthy of attention.  The team supporting the development and evolution of Swift is very interested in how the language can be improved to better support the development community that builds apps and systems using Swift.


This article is taken from : infoworld



Leave a Reply

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

You are commenting using your 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