[Accepted] SE-0420: Inheritance of actor isolation

Hi all,

The review of SE-0420: Inheritance of actor isolation ran from January 25 through February 6. The language steering group has decided to accept the proposal as writen.

It was heartening to see that folks were able to try out the experimental toolchain. A proportion of the review feedback identified discrepancies between the draft implementation and the proposed design (for example: the contextual type of #isolation and support for its use as a parameter's default value), which speaks to how the design as proposed addresses desired use cases.

We agree that, while it could be elegant to restrict callers from passing a custom argument to an isolated parameter that overrides #isolation, there ought to be no correctness issue arising from the lack of that expressivity at present, meaning this could be addressed as a future direction as indicated in the proposal.

The language steering group appreciates that generalized isolation checking rules in the proposal allow the compiler to understand a large proportion of but not every conceivable way of spelling an inherited isolation. To build on an example in the proposal:

actor MyActor {
  var counter = Counter()

extension MyActor {
  func testActor(other: MyActor) {
    // allowed
    await counter.incrementAndSleep(isolation: self)
    // not allowed
    await counter.incrementAndSleep(isolation: other)
    if other == self {
      // still not allowed
      await counter.incrementAndSleep(isolation: other)

We think the proposal is nonetheless acceptable because obvious alternative 'blessed' spellings are available (in the example above, self) and more thorough compiler support is possible in the future without breaking source.

Thank you again to everyone who provided thoughtful and thorough feedback during the review!

Xiaodi Wu
Review Manager


Is there a timeline for adding an attribute like @inheritsIsolation to the language?