Swift 5.10 can enforce full data isolation in concurrent code, preventing threads from reading and writing to the same memory at the same time. Credit: monticello / Shutterstock Apple has released Swift 5.10, an update to the company’s open-source programming language that reaches a major milestone: providing safety against data races via full data isolation in the concurrency model. The improvement prepares the way for the planned Swift 6 release. Binaries for Swift 5.10, introduced March 5, can be found at swift.org for Windows, macOS, and Linux. In explaining the milestone, Apple Swift engineer Holly Borla said an increasingly important source of undefined behavior is concurrent code that inadvertently accesses memory from one thread at the same time that another thread is writing to the same memory. This unsafety is called a data race, which makes concurrent programs exceptionally difficult to write, Borla noted. Swift 5.10 finally accomplishes full data isolation for concurrency after years of active development. The concurrency model was introduced in Swift 5.5 in September 2021. Swift 5.10 enforces full data isolation at compile time when the complete concurrency checking option is enabled, Borla said. This sets the stage for Swift 6, which will offer an opt-in Swift 6 language mode that enforces full data isolation by default. In the meantime, Swift 5.10 will produce data-race warnings in some circumstances where code could be proven safe with additional compiler analysis. A key focus of language development for Swift 6 is improving the usability of strict concurrency checking by mitigating false positive concurrency errors in common patterns proven to be safe, Borla said. Structured concurrency has been cited as a server-side goal for the Swift language. Related content feature 14 great preprocessors for developers who love to code Sometimes it seems like the rules of programming are designed to make coding a chore. Here are 14 ways preprocessors can help make software development fun again. By Peter Wayner Nov 18, 2024 10 mins Development Tools Software Development feature Designing the APIs that accidentally power businesses Well-designed APIs, even those often-neglected internal APIs, make developers more productive and businesses more agile. By Jean Yang Nov 18, 2024 6 mins APIs Software Development news Spin 3.0 supports polyglot development using Wasm components Fermyon’s open source framework for building server-side WebAssembly apps allows developers to compose apps from components created with different languages. By Paul Krill Nov 18, 2024 2 mins Microservices Serverless Computing Development Libraries and Frameworks news Go language evolving for future hardware, AI workloads The Go team is working to adapt Go to large multicore systems, the latest hardware instructions, and the needs of developers of large-scale AI systems. By Paul Krill Nov 15, 2024 3 mins Google Go Generative AI Programming Languages Resources Videos