Swift – Optionals

Introduction

With the introduction to a new programming language known as SWIFT in the past year by the biggest technical giants Apple Inc, most dominant player in the mobile market, a new stage was set for developers to come up with more. I will agree that Swift is an easier platform to learn for all the developers though specially who are new to iOS development platform but shifting from Obj-C is not easy particularly not using the (*) pointer notation [Just kidding..].

Even if you are new to iOS there are lot of concepts that are not so friendly to understand and pretty much creates a confusion while learning and using the language basics.

One of most limbo concept is Optionals. It took me really good time to understand what it is all about specially when I was coming from the Obj-C background.

As it is said, there are 2 sides of the coin. Here to its has pros as well as cons. On the cons, the highly relative term is complexity. Trust me if you do not understand why ? or ! operators are used you will land in dead zone.

Let’s start with the basics.

Continue reading “Swift – Optionals”