I'm not a fan of annotating everything with @MainActor. So yes, in the case of Sendable, the newValue must also conform to Sendable.
I’ve written Objective-C and pre-Swift 6 code for decades that just assumed that it was. How many weird crashes has that code caused over the years?
Yeah, I totally get the value of having the compiler catch these things, it's a solid direction.
Personally, I can't say I've run into that many crashes from threading issues in practice, at least judging by crash metrics, things have been pretty stable.
I just find it hard to get excited about spending too much time fixing compiler errors :)
Topic:
Programming Languages
SubTopic:
Swift
Tags: