Swift 6.4 has been released, bringing a range of language and tooling enhancements. Key updates include the introduction of Subprocess 1.0, a new cross-platform API for launching and interacting with external processes. The release also significantly boosts Wasm generated code performance, making it up to 40 times faster, and improves interoperability with C++20 and Java environments.
The new Swift version simplifies syntax, allowing `AType?` instead of `(some AType)?` or `(any AType)?`. A new `@diagnose` attribute provides control over compiler diagnostics and warnings. Additionally, developers can now disambiguate identically named symbols imported from different modules using `AModuleName::`.
Swift Concurrency receives practical improvements in 6.4. The `defer` statement now directly supports the `await` keyword, removing the need for separate `Task` wrappers for asynchronous calls. A new `withTaskCancellationShield` feature temporarily protects tasks from cancellation, ensuring critical cleanup code can complete.
The release expands support for non-copyable values, reducing unnecessary copying and allocations in array operations. New types and protocols like `UniqueArray`, `UniqueBox`, `Ref`/`MutableRef`, and `Iterable` are introduced. `UniqueBox` provides a non-reference counted smart pointer with unique ownership, while `UniqueArray` avoids copy-on-write allocations. The `Iterable` protocol enables iteration using borrowing semantics, further preventing copies.
Further borrowing-related changes include `Ref` and `MutableRef` for storing borrowed or mutable individual values. Borrow and mutate accessors are now available for reading from or modifying `Span` or `InlineArray` through properties. Non-copyable types can now conform to `Equatable`, `Comparable`, and `Hashable` protocols.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
Swift 6.4 introduces a new Subprocess library, improves interoperability with C++20 and Java, and delivers up to 40 times faster Wasm generated code. The update also includes expanded support for non-copyable values and enhancements to Swift Concurrency, aiming to simplify code and reduce friction in concurrency adoption.