Why I am learning Swift 3 not C# or Java in 2k17

Spread the love

Let’s start with a question. Why Swift 3 in 2k17 where I can learn hybrid application development with Xamarin, Codova-Ionic or PhoneGap?

Well the first thing that came to my mind is I want to build app for an specific system where all the functionalities of a device can fully be used and manipulated for specific purpose. So, basically I am up to learn and build native Apps.

Swift is pretty clean language and truth is I’m in love with it since I started learning it. I have learned Java while I was bachelor student and it always seemed to me why I have to write a lot whereas Swift is straight forward out of the box and seems easy so far; I am learning the language so in future I am gonna dig deep so for now it’s quite simple and easy to me compared to Java. let’s give an example on that.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//Java
public class MyClass {
   public static void main(String args[]) {
      int x = 5;
      double y = 5.00;
      double sum = x+y;
      System.out.println(sum); // Output: 10.00
   }
}
 
//Swift 3
var x = 5
var y = 5.0
var sum = Double(x) + y
print(sum)

Swift is quite straight forward right? Well to me it is so does Kotlin and Python.

There are few things I like so far about Swift is Optional operator, String Interpolation, Nil- Coalescing Operator, Range Operators (loop), Collection type and functions representations.

I will try to describe as much as I can though blogging thing is quite new to :).