Why do not actor-isolated properties support 'await' setter?

The difference is what that syntax communicates: await x = 1 tells nothing about where this state isolated, how it plays with other parts of the actor state, etc. It also allows to modify state in a much less obvious ways, so

await someActor.x = 1
await someActor.y = 2

Isn’t the same as

await someActor.update(x: 1, y: 2)

And that can lead to unexpected results.

At the same time, message is a clear communication point between isolation domains. As it was stated in one of the threads, thinking about actors as regular classes isn’t a good approach — they look like one, but there is a significant difference in programming paradigms.

4 Likes