Has SE-0466 been implemented in Swift 6.2?

As SE-0466 is part of "Approachable Concurrency", I thought it had been implemented as part of Swift 6.2. Has it? The proposal in the repo is apparently not updated with its correct status (I think it should be "accepted" at least). I ask because a post by @Jnosh seems to suggest enabling "Approachable Concurrency" in Xcode only enables InferIsolatedConformances and NonisolatedNonsendingByDefault two features.

1 Like

My understanding is as follows:

SE-0466 is implemented in Swift 6.2 and part of the approachable concurrency "vision" but it doesn't have an associated upcoming feature as the default isolation remains nonisolated so there is no semantic change for existing code. MainActor isolation is opt-in.

The Xcode "Approachable Concurrency" setting enables the following upcoming features according to its own description: DisableOutwardActorInference, GlobalActorIsolatedTypesUsability, InferIsolatedConformances, InferSendableFromCaptures, and NonisolatedNonsendingByDefault.
The majority of these predates Swift 6 and the approachable concurrency vision and are already always enabled when you compile in Swift 6 mode. In the linked post I was talking specifically about Swift 6 mode so I only focused on the two new upcoming features that are enabled by Xcode's "Approachable Concurrency" setting in that mode.

More generally, while Xcode's "Approachable Concurrency" borrows the name, it is not the same as the approachable concurrency vision. The two new upcoming features were part of that push but the older ones predate it. And various proposals were implemented as part of that vision that don't need an upcoming feature and are simply always available. Upcoming features are generally reserved for source breaking changes that will only become the default in a future language mode to avoid breaking existing code.

EDIT: And just to be clear, in Xcode you can also enable all the individual upcoming features manually without enabling the "Approachable Concurrency" setting at all and you would get identical behavior. "Approachable Concurrency" is simply a tool that lets you enable a bunch of concurrency related upcoming features independent of language mode without having to enable them individually. My speculation would be that this exists to improve the default for new projects (Xcode defaults to Swift 5 mode but with Approachable Concurrency" enabled for new projects) and so there is a simple setting that can be referred to by documentation and WWDC sessions to help people migrate existing projects.

1 Like