Swift Only Features


Below are the features introduced in swift and not present in Objective C
  • 'repeat while' which is conceptually equal to 'do while' in C/Objective C
  • guard statement
  • 'Any' (keyword using which arrays dicts can store objects of discrete type)
  • 'fallthrough' (using which we can allow implicit fall-through in switch statement which is not default in Swift unlike Objective C)
  • 'AnyObject' conceptually equivalent to id in Objective C
  • Optionals
  • Tuples
  • Range Operator

No comments:

Post a Comment