Sunday, October 5, 2014

What is new in ios Swift comparing to Objective C

After taking a quick look at iOS swift, from my impression, it does not contain many new concept not seen in C# or Java, it is more like a catch-up to C# or java instead of a new language for developing.

Compare to Objective C, the new things swift provide are:

1. remove the compatible with c, or there is not need to prepend '@' when string is used
2. support optional types
3. support generic in class or method
4. use a single .swift file to define class instead of separate header (.h) file and (.m) implementation file
5. use tuple to return multiple values without defining the multiple output parameters


No comments:

Post a Comment