{"id":52395,"date":"2026-06-24T16:54:42","date_gmt":"2026-06-24T20:54:42","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=52395"},"modified":"2026-06-24T16:56:49","modified_gmt":"2026-06-24T20:56:49","slug":"swift-6-4","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2026\/06\/24\/swift-6-4\/","title":{"rendered":"Swift 6.4"},"content":{"rendered":"<p>Swift 6.4 is now available in beta form with Xcode 27. The Swift Evolution proposals are listed <a href=\"https:\/\/www.swift.org\/swift-evolution\/#?version=6.4\">here<\/a>.<\/p>\n\n<p><a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/262\/\">What&rsquo;s new in Swift<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/262\/\">\n<p>Discover the latest language advancements, including updates for everyday ergonomics, improved concurrency, and safer high-performance code. Explore workflow and language interoperability improvements and updates in embedded Swift.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/265\/\">Build real-time apps and services with gRPC and Swift<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/265\/\">\n<p>Build engaging live experiences with gRPC in your Swift app and backend. gRPC is an open-source RPC framework designed for high-performance, bidirectional streaming APIs. Explore how the gRPC Swift package provides a modern, safe runtime built with Swift concurrency.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/328\/\">Explore numerical computing in Swift with MLX<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/328\/\">\n<p>Bring NumPy-style computing natively to Swift with MLX Swift. Discover how to eliminate cross-language friction in your machine learning workflows by handling image processing, tensor operations, and neural network training in a single, type-safe environment. Explore the APIs that let you leverage GPU acceleration while enjoying the compiler, tooling, and debugging experience you already know.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/8001\/\">Swift Group Lab<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2026\/8001\/\">\n<p>Join us online for a deep dive into WWDC26 with Apple engineers and designers to ask questions, get advice, and follow the discussion about the week&rsquo;s biggest Swift announcements.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/www.massicotte.org\/blog\/wwdc26-unanswered-qa\/\">Matt Massicotte<\/a>:<\/p>\n<blockquote cite=\"https:\/\/www.massicotte.org\/blog\/wwdc26-unanswered-qa\/\">\n<p>There&rsquo;s a voting system. And that means a number of questions weren&rsquo;t selected. This time I copied those down and I thought it could be fun to take a shot at answering the ones that are more in my area.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/developer.apple.com\/documentation\/xcode-release-notes\/xcode-27-release-notes\">Xcode 27 Beta 2 Release Notes<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/documentation\/xcode-release-notes\/xcode-27-release-notes\">\n<p>The Swift dependency scanner has been optimized to avoid redundant setup work and header searches when looking up Clang modules during a single dependency-scan action, substantially improving scanning performance.<\/p>\n<p>As a consequence of this change, every Clang module reachable from a single Swift dependency-scan action must have a unique module name. If two module maps visible to the same scan declare a Clang module with the same name, the scan may report an error.<\/p>\n<p>[&#8230;]<\/p>\n<p>System now provides Swift APIs for the C <code>stat<\/code>, <code>lstat<\/code>, <code>fstat<\/code>, and <code>fstatat<\/code> system calls. This includes a new <code>Stat<\/code> type with initializers from <code>FilePath<\/code>, <code>FileDescriptor<\/code>, or a C string; <code>FilePath.stat()<\/code> and <code>FileDescriptor.stat()<\/code> instance methods; and supporting types (<code>FileType<\/code>, <code>FileMode<\/code>, <code>FileFlags<\/code>, <code>UserID<\/code>, <code>GroupID<\/code>, <code>DeviceID<\/code>, and <code>Inode<\/code>).<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/wadetregaskis.com\/whats-coming-in-swift-6-4\/\">Wade Tregaskis<\/a>:<\/p>\n<blockquote cite=\"https:\/\/wadetregaskis.com\/whats-coming-in-swift-6-4\/\">\n<p>The final piece of the <a href=\"https:\/\/forums.swift.org\/t\/prospective-vision-accessors\/76707\">Prospective Vision for Accessors<\/a>, this allows for more efficient accessors on <code>struct<\/code>s, in a nutshell.<\/p>\n<p>[&#8230;]<\/p>\n<p>Now there&rsquo;s a safer version of the existing <code><a href=\"https:\/\/developer.apple.com\/documentation\/swift\/withunsafetemporaryallocation(of:capacity:_:)\">withUnsafeTemporaryAllocation<\/a><\/code> (<a href=\"https:\/\/github.com\/swiftlang\/swift-evolution\/blob\/main\/proposals\/0322-temporary-buffers.md\">first introduced in Swift 5.6<\/a>). It works just like you&rsquo;d expect.  It comes in both &ldquo;raw bytes&rdquo; and typed elements versions, just like its unsafe predecessor.<\/p>\n<p>[&#8230;]<\/p>\n<p class=\"wp-block-paragraph\">The new <code>isTriviallyIdentical(to:)<\/code> method offers a guaranteed-fast way to check two objects for equality. It is essentially an optimised version of the existing equality condition provided by <code>Equatable<\/code> and the <code>==<\/code> operator. It&rsquo;s useful because it <em>guarantees<\/em> O(1) time complexity, whereas <code>==<\/code> makes no formal guarantees at all (and for many types is O(N) or worse). But unlike the existing <em>identity<\/em> comparison operator <code>===<\/code> &#x2013; also O(1) &#x2013; it promises to do more than just tell if two objects are the exact same pointer, <em>and<\/em> it works on value types (not just reference types).<\/p>\n<p>[&#8230;]<\/p>\n<p><a href=\"https:\/\/wadetregaskis.com\/whats-coming-in-swift-6-4\/\">These<\/a> new types generalise the existing patterns of borrowed and mutable references, that have previously existed in Swift in much more restricted forms (e.g. <code>inout<\/code> parameters are essentially <code>MutableRef<\/code> parameters, and <code>Span<\/code> &amp; <code>MutableSpan<\/code> are array equivalents).<\/p>\n<p>There&rsquo;s now a built-in function for demangling Swift symbol names, in the <code>Runtime<\/code> module (that&rsquo;s bundled with the Swift toolchain, alongside the stdlib etc).<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/onmyway133.com\/posts\/whats-new-in-swift-6.4-at-wwdc26\/\">Khoa Pham<\/a>:<\/p>\n<blockquote cite=\"https:\/\/onmyway133.com\/posts\/whats-new-in-swift-6.4-at-wwdc26\/\">\n<p>As Apple has aligned OS version numbers across platforms, Swift 6.4 takes the next step by letting you collapse repetitive availability attributes into a single <code>anyAppleOS<\/code> token.<\/p>\n<p>[&#8230;]<\/p>\n<p>There are situations where you need to call a deprecated API while you plan a migration, or audit a critical function for unsafe usage, without letting those concerns bleed into the rest of the project. The new <code>@diagnose<\/code> attribute handles both cases.<\/p>\n<p>[&#8230;]<\/p>\n<p>Some work should complete even after a task is cancelled, like flushing a file to avoid corruption. <code>withTaskCancellationShield<\/code> wraps a region where <code>Task.isCancelled<\/code> always returns false.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/www.avanderlee.com\/concurrency\/swift-6-4-whats-new-in-concurrency\/\">Antoine van der Lee<\/a>:<\/p>\n<blockquote cite=\"https:\/\/www.avanderlee.com\/concurrency\/swift-6-4-whats-new-in-concurrency\/\">\n<p>Swift 6.4 implements <a href=\"https:\/\/github.com\/swiftlang\/swift-evolution\/blob\/main\/proposals\/0493-defer-async.md\">SE-0493: Support <code>async<\/code> calls in <code>defer<\/code> bodies<\/a>. This is one of those changes that feels obvious once you need it.<\/p>\n<p>[&#8230;]<\/p>\n<p>Swift 6.4 improves error handling for unstructured tasks through <a href=\"https:\/\/github.com\/swiftlang\/swift-evolution\/blob\/main\/proposals\/0520-discardableresult-task-initializers.md\">SE-0520: Discardable result use in Task initializers<\/a>. The change helps you catch a subtle bug: creating a throwing task and then ignoring its returned task handle.<\/p>\n<p>[&#8230;]<\/p>\n<p>Swift 6.4 also implements <a href=\"https:\/\/github.com\/swiftlang\/swift-evolution\/blob\/main\/proposals\/0530-async-result-support.md\">SE-0530: Async Result Support<\/a>.<\/p>\n<p>[&#8230;]<\/p>\n<p>Swift 6.4 implements <a href=\"https:\/\/github.com\/swiftlang\/swift-evolution\/blob\/main\/proposals\/0518-tilde-sendable.md\">SE-0518: <code>~Sendable<\/code> for explicitly marking non-<code>Sendable<\/code> types<\/a>. It allows you to communicate that a type has been audited and should not conform to <code>Sendable<\/code>.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/forums.swift.org\/t\/recent-improvements-to-the-type-checker\/87048\">Slava Pestov<\/a>:<\/p>\n<blockquote cite=\"https:\/\/forums.swift.org\/t\/recent-improvements-to-the-type-checker\/87048\">\n<p>I thought it would be a good time to detail some of the type checker performance improvements we worked on since I shared the <a href=\"https:\/\/forums.swift.org\/t\/roadmap-for-improving-the-type-checker\/82952\">type checker performance roadmap<\/a> last year. I&rsquo;m also going to outline a couple of things we plan on looking at next.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/06\/24\/swift-6-3\/\">Swift 6.3<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/06\/17\/wwdc-2026-links\/\">WWDC 2026 Links<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/06\/09\/xcode-27-announced\/\">Xcode 27 Announced<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/01\/27\/swift-pitch-borrowing-sequence\/\">Swift Pitch: Borrowing Sequence<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2025\/11\/14\/roadmap-for-improving-the-swift-type-checker\/\">Roadmap for Improving the Swift Type Checker<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2025\/10\/30\/swift-6-2-subprocess\/\">Swift 6.2: Subprocess<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2024\/12\/19\/swift-prospective-vision-accessors\/\">Swift Prospective Vision: Accessors<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2024\/12\/05\/swift-proposal-precise-control-flags-over-compiler-warnings\/\">Swift Proposal: Precise Control Flags Over Compiler Warnings<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Swift 6.4 is now available in beta form with Xcode 27. The Swift Evolution proposals are listed here. What&rsquo;s new in Swift: Discover the latest language advancements, including updates for everyday ergonomics, improved concurrency, and safer high-performance code. Explore workflow and language interoperability improvements and updates in embedded Swift. Build real-time apps and services with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2026-06-24T20:54:48Z","apple_news_api_id":"2b7a72a8-b008-49ce-9d2a-479bc12ec6d4","apple_news_api_modified_at":"2026-06-24T20:54:48Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AK3pyqLAISc6dKkebwS7G1A","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[31,2887,46,30,2784,138,71,2200,901],"class_list":["post-52395","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-ios","tag-ios-27","tag-languagedesign","tag-mac","tag-macos-27","tag-optimization","tag-programming","tag-swift-concurrency","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/52395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=52395"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/52395\/revisions"}],"predecessor-version":[{"id":52396,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/52395\/revisions\/52396"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=52395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=52395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=52395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}