The features of Swift

The features of Swift are designed to work together to create a language that is powerful, yet fun to use. Some additional features of Swift include:

  • Closures unified with function pointers
  • Tuples and multiple return values
  • Generics
  • Fast and concise iteration over a range or collection
  • Structs that support methods, extensions, and protocols
  • Functional programming patterns, e.g., map and filter
  • Powerful error handling built-in
  • Advanced control flow with do, guard, defer, and repeat keywords
原文地址:https://www.cnblogs.com/feng9exe/p/9004625.html