9 reasons why you need to learn Swift ?

  1. Easy to read, ObjC suffers all warts you would expect from a language build on top of C. and they introduced new keywords using @ in front of. Swift drops legacy conventions like no need to use the semi colon, parenthesis, brackets while calling functions.
  2. East to maintain, Again legacy holds ObjC back, C requires the programmer to maintain 2 files in order to improve the build time and efficiency. Swift drops the 2 files requirements, here Xcode and LLVM compiler manage that.
  3. Safe, ObjC handling with pointers nil, null pointers. if you calling a function with nil, the random crash will come and it will really to find. Optional makes it very easy in Swift it will generate compile time error if you are trying to write bad code.
  4. Unified with Memory Management, ObjC supports ARC is complete across Cocoa APIs and Object-Oriented code if you are using procedural code and APIs like core graphics it will be developer responsibility to manage memory. in Swift it solved and they have proven it will improve the productivity and the other side is garbage collector running cleaning up for used memory.
  5. Less code, Compare to ObjC, Swift reduces the amount of code for repetitive statements and string manipulation.
  6. Fast, Dropping legacy C conventions has greatly improved performance.
  7. Name Collisions Issues, let’s say if you are using Facebook SDK if your file and Facebook file name is same it will create linker error in ObjC so the general conventions are to used prefix like NS/CG etc. Swift provides implicit namespaces that allow same source code file to exist across multiple projects.
  8. Dynamic libraries, the biggest change – dynamic libraries are a chuck of code that can be linked to an app. this feature allows Swift apps to link against new versions.
  9. Swift playground – interactive coding.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.