Pros/cons of Swift

|

Pros/cons of Swift

This modern and powerful programming language has a number of advantages that set it apart from others or the same Objective-C. And these are powerful new language features, extremely strict data typing, more concise syntax, significantly higher performance in operations of access to collections (sorting and searching), support for a certain majority of modern syntactic constructions existing in other high-level programming languages. And one of the main features of Swift is that it has full backward compatibility with Objective-C. Thus it allows you to gradually rewrite projects from one language to another, and also gives the opportunity to use the functionality of Objective-C inside of Swift.

One of the nice things is Playground – a kind of interactive sandbox, where a developer can write code and immediately see the result of his labors. This allows you to increase the speed of writing the main project by several times, because writing separate pieces of code or algorithms can now be done in the Playground with visual feedback, without the risk of committing errors in the main project.

Apple has redesigned many things, giving us a virtually new advanced enumeration system, efficient accessor management, and optimized automatic garbage collection.

The dark side of the language is its low popularity and low prevalence. Most current projects are written in Objective-C and will have to be maintained, and many companies don’t rewrite their big projects just because it’s a huge and incredibly time-consuming process.