I like the concept of this, except for the inferred part. I would rather that it requires (via compiler error) you to manually annotate each type with @MainActor
. This way if you ever copy/move a type out of such a module, it's behavior doesn't change wildly. Also when others share their code online, we'd never be able to know if their code is inferred @MainActor
or if it was nonisolated
.
3 Likes