[Accepted with modifications] SE-0431: `@isolated(any)` Function Types

Hello Swift Community,

The review of SE-0431 "@isolated(any) Function Types" ran from March 27 through April 9, 2024, and was extended to discuss syntactic issues of @isolated(any) and semantic interactions with region-based isolation.

The Language Steering Group has decided to accept the proposal with one modification.

The proposal as originally reviewed stated that an @isolated(any) function is implicitly @Sendable. However, this was based on the assumption that a non-Sendable @isolated(any) could not meaningfully be used, which is not true given the semantics of SE-0414 "Region-based isolation" and it's follow-on proposal SE-0430. Therefore, this inference rule has been removed from SE-0431, and an @isolated(any) can be marked @Sendable (or not) just like other function tyoes.

On the question of the syntactic similarity between @isolated(any) and isolated parameters, the Language Steering Group determined that the proposal as specified is the best option for spelling this feature. Removing the @ to provide surface-level equivalence with isolated parameters introduces parsing ambiguities and makes it less clear that it is part of the function type, while alternative names (such as @dynamicallyIsolated) imply that there might be several new attributes in the new space. The proposal @isolated(...) provides space for future expansion as needed within the same overall syntax.

Thank you to the authors and everyone who participated in the pitches and reviews.

Doug Gregor
Review Manager

15 Likes