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.

Capturing objects in Swift closures

Swift closures can capture and store references to any variables and constants from the context in which they are defined. This is a great feature, making closures easy to work with and extremely versatile. However, capturing references can be problematic. Closures which are stored, and which capture references, can result in retain cycles. A common solution to this is to weakly capture references. While this is a valid approach, alternative solutions are available which provide their own benefits. In this post, John Sundell looks are some of these solutions.