[Pitch] Isolated conformances

As an update-to-the-update, the implementation is now in sync with the proposal. I have toolchains for macOS and Linux (Windows coming soon), if anyone wants to kick the tires:

There are three experimental features at play here for this proposal:

  • IsolatedConformances: allows one to define and use isolated conformances, e.g., class MyClass: @MainActor P { }, the main part of the proposal.

  • StrictSendableMetatypes: implements the restriction on sending metatypes in generic code. This enables just the source-breaking part of the proposal. Without it, isolated conformances are not data-race-safe, but you can try it out independently.

  • UnspecifiedMeansMainActorIsolated: this experimental feature is the subject of the ongoing review of SE-0466. When enabled, it infers @MainActor for code that isn't explicit about its isolation. When isolated conformances are also enabled, we infer @MainActor for any conformances in the module of @MainActor types unless they are explicitly marked nonisolated.

    Doug

4 Likes