Get the latest tech news

Swift 6


We’re delighted to announce the general availability of Swift 6. This is a major new release that expands Swift to more platforms and domains.

Swift 6 introduces a number of productivity enhancements, including count(where:) to streamline counting the number of elements in a sequence that satisfy a predicate, pack iteration for writing natural for-loops over the elements in a value parameter pack, access control for imports to keep implementation details from leaking into your public APIs,@attached(body) macros for synthesizing and augmenting function implementations, expression macros as default arguments, and more. Swift 6 provides a new debugging macro to easily customize how an object is displayed in LLDB when using the p command, and in the variables view in Xcode and VSCode, by using a formatting scheme that does not run arbitrary code. Swift 6 supports building fully statically linked executables for Linux; these have no external dependencies, so they are ideal for situations where you want to copy a program directly onto a system or into a container and run it without installing any extra software.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Swift

Swift

Related news:

News photo

Swift is a more convenient Rust

News photo

Show HN: Skip – Build native iOS and Android apps from a single Swift codebase

News photo

RubyGateway: Embed Ruby in Swift