Design Priorities for the Swift 6 Language Mode

We were just talking about global actor inference in another thread, and it was suggested we bring the suggestion over here:

I would like to propose removing all global-actor inference in Swift 6.

Global actor inference has an extremely complex set of rules, including some extremely surprising ones (such as the "property wrappers" one that is the original subject of that thread). It creates "spooky action at a distance" where conforming to a new protocol, or using a new property wrapper, might completely change the global actor of a type (and all its members).

This kind of source-breaking change might be rough on consumers of frameworks like UIKit, but I believe that it will lead to better understanding of the actual actor isolation requirements of the code that people are writing, as well as fewer hidden surprises and gotchas.

3 Likes