Support Negative Availability Literals The availability condition #available is used to execute code conditionally based on the required platform and version conditions. Currently, it's only possible to check if conditions are positively satisfied. In this Swift evolution pitch, Bruno Rocha proposes extending #available to support checking if conditions are not satisfied. Posted on September 13, 2020 #evolution
Typed throws Swift provides support for throwing, catching, propagating, and manipulating recoverable errors. To indicate that a function or method can throw an error, we add the throws keyword to the declaration. In this very detailed Swift evolution pitch, Jorge proposes adding the ability to specify the type of an error that a function will throw. Posted on September 1, 2020 #evolution #error
Extend implicit member syntax to cover chains of member references This Swift evolution proposal suggests an expansion of implicit member syntax to more complex expressions than just a single static member or function. What this means is that when the type of an expression is implied by the context, developers would be able to use leading dot syntax, even when the expression consists of chains of member references. This is a very logical language evolution in my opinion. Posted on August 30, 2020 #evolution
[Concurrency] Add `async` to the Swift type system. Modern development involves a lot of asynchronous programming, implemented in Swift using closures and completion handlers. However, implementing asynchronous operations using closures can quickly become problematic, and tasks such as error handling and conditional execution become harder to do correctly. Coroutines are a specialized type of subroutine/function which allows for execution to be suspended and resumed, and the coroutine model has long been proposed as a Swift language extension to make asynchronous programming more natural and less error-prone. In this pull request, Doug Gregor begins the introduction of coroutines to Swift, adding async to the Swift type system. A good first step towards a better asynchronous future. Posted on August 15, 2020 #evolution #pull request #coroutine #asynchronous
Package Manager Source Archive Dependencies In this Swift evolution pitch, Mattt proposes extending the Swift Package Manager to add support for non-binary source dependencies. As Mattt outlines, this proposal is part of the necessary groundwork required to achieve the overall goal of creating a Swift package registry service. Posted on August 13, 2020 #evolution #swiftpm
Memoization of Swift properties Memoization is an optimization technique where the results of expensive computations (e.g function calls or computed properties) are stored, and these cached results are returned when the inputs to future computations are unchanged. In this Swift evolution pitch, Justin Reusch proposes adding keywords to Swift which tell the compiler when to synthesize boilerplate code to support the memoization of computed properties. I think this would be a good addition to the language. Posted on August 8, 2020 #evolution #memoization
Allow Property Wrappers with Multiple Arguments to Defer Initialization when wrappedValue is not Specified Swift Property Wrappers without arguments can defer specifying the wrapped value until the initialization of the containing type. In this Swift evolution pitch, Andrew Arnopoulos proposes making this feature available to Property Wrappers which have multiple arguments. Seems like a reasonable proposal to me. Posted on July 28, 2020 #evolution #property wrapper
Proposing to expand `available` to introduce `discouraged` Swift's available attribute documents characteristics of a declaration's lifecycle. This Swift evolution pitch from Erica Sadun and Chris Lattner proposes extending the available attribute, introducing discouraged, an argument that can be used to describe why using the associated declaration is discouraged. A small but useful addition to the language. Posted on July 24, 2020 #evolution
Forward scan matching for trailing closures Swift 5.3 extended trailing closure syntax, allowing additional labeled trailing closures to follow an initial un-labeled trailing closure. In this Swift evolution pitch, Doug Gregor from the Swift Core Team proposes an improvement to how the Swift compiler scans and matches trailing closure arguments to parameters. This is a source-breaking change, but Doug believes that it's worth doing now to get an improved scanning model sooner. Posted on July 21, 2020 #evolution #closure
Invert guard let scoping In this Swift evolution pitch, Danny Sung proposes the introduction of an inverted scope guard let pattern. Danny explains that this would solve the problem of guarding against a condition, while also making an optional value associated with the condition available inside the body of the guard statement. Although I understand the problem, I am not sure if adding negated versions of such keywords is the right solution. Posted on July 18, 2020 #evolution