What's new in Swift ?

Asked on 06/27/2025

1 search

At WWDC, Apple introduced several new features and improvements in Swift, particularly with the release of Swift 6 and Swift 6.2. Here are some of the highlights:

  1. Swift 6 Language Mode: This new mode provides data race safety guarantees, helping developers write correct concurrent programs. It allows for module-by-module adoption, making it easier to integrate into existing projects.

  2. Non-Copyable Types: Swift 6 introduces non-copyable types, which suppress the default copyability of Swift types. This is useful for scenarios requiring unique ownership, such as managing system resources like files.

  3. Embedded Swift: Swift 6.2 expands the capabilities of Embedded Swift, a subset of Swift designed for highly constrained environments like firmware for embedded devices. It now includes full string APIs and new types like Inline Array and Span for efficient memory management.

  4. Strict Memory Safety: Swift 6.2 introduces a feature called Strict Memory Safety, which requires explicit acknowledgment of unsafe API usage in source code. This helps identify parts of the code that need extra security attention.

  5. Performance Improvements: Swift 6.2 includes performance enhancements, such as inline arrays that allow for fixed-size arrays stored on the stack, and a new span type for safe, fast access to contiguous memory.

  6. Development Workflow Enhancements: Improvements have been made to the development workflow, including better support for writing, building, and debugging Swift code. The Swift extension in VS Code has been officially verified and includes features like background indexing.

  7. Library Updates: Swift 6.2 modernizes the Foundation API and introduces new APIs for everyday programming tasks, such as launching subprocesses.

For more detailed information, you can watch the session What’s new in Swift (00:00:00) from WWDC 2025.