I agree that Swift 6 is a very difficult language to use, and that something needs to be done to improve the situation, and I'm not really against the idea of a mode that isolates everything to the main actor by default ā that definitely makes it easier to work with Apple's SDKs.
What I do have is a vague sense of unease, that the problem with Swift 6 isn't so much Swift 6, as the state of Apple's SDKs. For example, AVFoundation
, Security
, etc. are more or less impossible to interact with from Swift 6, but I don't think that's mostly Swift's problem.
(I also think there's a limit to what MainActor-only can accomplish ā for example, AVFoundation
won't actually be usable even in the proposed dialect, since it explicitly gives you synchronous, @Sendable
callbacks that are expected to invoke @MainActor
methods, which would still be illegal)
I also think that there's an aspect of "throwing the baby out with the bathwater" in the vision, in that if we encourage people to uses classes, inheritance, and global variables in the MainActor-only mode, they are only making life harder for themselves in the long run ā those things are bad for concurrency, yes, but they're also generally harder to work with and reason about than immutable data and value types.
tl;dr: I think the current state of pain is less about Swift 6 itself than that the world hasn't caught up yet. I'd love to see what the world looks like in a couple of years, when class
isn't the first thing recommended by beginner tutorials, when Apple has had more time to produce Swift-friendly APIs, and be able to use the hindsight there, to decide whether this is really a change we need to make now.
My experience is that writing Swift 6 "from scratch", and with APIs that are designed for it, isn't really harder than Swift 5. It's just that, for the moment, I mostly have to create those APIs for myself (which is hard).