9 reasons why you need to learn Swift ?

  1. Easy to read, ObjC suffers all the warts you would expects 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 semi colon, parenthesis, brackets while calling functions.
  2. East to maintain, Again legacy holds ObjC back, C requires programmer to maintain 2 files in order to improve the build time and efficiency. Swift drops the 2 files requirements, here Xcode and LLVM complier manage that.
  3. Safe, ObjC handling with pointers nil, null pointers. if you calling a function with nil, 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, lets 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 is 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 chuck of code that can be linked to an app. this feature allow 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 )

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