Posts

Showing posts from March, 2019

Swift 4.2 Release: What's new in this release

Swift 4.2 is out now and shipped with Xcode 10. This release updates important Swift 4.1 features and a lot of code improvements which we will discuss in this blog. Swift 4.2 has faster builds. Language features to improve efficiency. SDK improvements for Swift. Before we start discussing version 4.2 further please take a look on swift version history. Here you will find the improvement in language a bit detail so that you can have a better idea about the changes. Some of these changes are easy to implement. Let’s check it out. Run-time Optimisation : In an earlier version of Swift its every time retain and release when we use some object, but in Swift 4.2 Apple has removed that extra retain (Now Guaranteed (+0 retain) ?) and release which you can check below. class X { … } func caller() { // ‘x’ created with +1 reference count let x = X() } foo(x) func foo(x: X) { let y = x.value // Calling Convention: “Owned” (+1 retain) class X { ...