3 ms·
> missing 80% reason to use Rust: it helps to ensure correctness of multi threaded synchronization at compile time Article may have overlooked this since it's
by Terretta 2y ago
> missing 80% reason to use Rust: it helps to ensure correctness of multi threaded synchronization at compile time
Article may have overlooked this since it's been available in recent 5.x and becomes default in 6:
Swift 6 brings complete concurrency enabled by default
By far the biggest change is that complete concurrency checking is enabled by default. Unless you're very fortunate indeed, there's a very good chance your code will need some adjustment – it's no surprise the Swift team made it optional in earlier versions to give folks time to evaluate what's changing.
Swift 6 improves concurrency checking further, and the Swift team say it "removes many false-positive data-race warnings" that were present in 5.10. It also introduces several targeted changes that will do wonders to make concurrency easier to adopt – if you tried with 5.10 and found things just too gnarly to figure out, hopefully some of the changes in Swift 6 will help.
Easily the biggest is SE-0414, which defines isolation regions that allow the compiler to conclusively prove different parts of your code can run concurrently.
https://www.hackingwithswift.com/articles/269/whats-new-in-swift-6 https://www.hackingwithswift.com/articles/269/whats-new-in-s...
- lostmsu 2y agoIs there a better description of this change? How does it work internally? Is thread safety guaranteed or best effort warning? How does it work with immutable objects?