Wednesday, March 6, 2019

What is Latest swift version? Whats new?

Latest Version: Swift 4.2

Swift 4.2 is a major language release and contains the following language changes and updates that went through the Swift Evolution process:

  • Generics improvements
With the completion of conditional conformance support, Swift 4.2 makes significant progress in implementing the vision of generics in the language. Better support for generics ultimately reduces the amount of boilerplate needed in your code and make more of your code reusable.

  • Standard Library updates
The standard library in Swift 4.2 includes a number of new features, including improvements to the Hashable protocol as well as a new unified set of randomization functions and protocols.

  • Binary compatibility
Swift 4.2 brings the language closer towards a stabilized ABI, enabling binary compatibility for future releases of Swift. Visit the ABI Dashboard for more details on the current progress of this effort.

Additional language and compiler updates

Swift 4.2 includes a number of improvements that have a noticeable impact on developer experience, including:

  1. Support for batch mode compilation resulting in faster build times
  2. Change in calling convention for retain/release cycle to reduce code size and improve runtime performance
  3. Lazier SIL deserialization with -Onone
  4. Recursive metadata support
  5. More compact reflection metadata
  6. Default arguments are inlined at call sites
  7. Some long-standing bug fixes, including init declname, switch with multiple case labels per block, inheritance of generic initializers, and more