XIO

xWire

Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.

Swift Forums - Latest posts

Latest posts

[Pitch #2] Called-once function types

FranzBusch: Is it the right choice to default the implicit to consuming if we believe there might be value further down the road to lift the borrowing restriction? It would add yet another case of where something behaves differently than the "norm". I think I would personally rather write the consuming modifier out. Nickolas_Pohilets: IMO, that's redundant. Attempt to call the function will diagnose the error anyway. I agree that it makes sense to lift the borrowing restriction now, even if…

Conform Never to CustomStringConvertible

I’m with Xaiodi on this. CustomStringConvertible indicates whether a specific entry point for stringification is available, not whether stringification as a whole is sensible to do. If it did mean that, it would just be called StringConvertible. If your logging framework needs to distinguish between types it makes sense to log and types it doesn’t, you will probably need to create your own protocol to model that and conform whatever types you think appropriate, possibly including Never.

SE-0565: Allow Deprecating Package Products

Hello, Swift community! The review of SE-0565: Allow Deprecating Package Products begins now and runs through November 25, 2026. Reviews are an important part of the Swift evolution process. All review feedback should be either on this forum thread or, if you would like to keep your feedback private, directly to me as the review manager by email or DM. When contacting the review manager directly, please put "SE-0565" in the subject line. What goes into a review? The goal of the review process…

SE-0558: Bulk update operations for `MutableSpan` and `MutableRawSpan`

I like the copyingFrom: idea for the label. John_McCall: I'm not sure I see the need for the variant that returns an iterator; this just doesn't seem worth special-casing vs. the existing variant that mutably copies from an iterator. That's fair. I wonder if having only (a) the postcondition-enforcing variant that takes an Iterable or (b) the inout BorrowingIteratorProtocol version puts too much distance between two related API. The variant that returns an iterator is a fairly short editing…

Design question: when should an ambiguity be diagnosed through its shared fixes? (#89572)

Hi all, I have a draft PR, [Sema] Diagnose fixes shared across all ambiguous solutions (#87218) by carloshpdoc · Pull Request #89572 · swiftlang/swift · GitHub, for #87218 and I am blocked on a design question in the constraint solver diagnostics. I would appreciate guidance before going further. For this code: let dictionary = [String: [String]]() var optionalValue: String? if let array = dictionary["foo"] { array.append(optionalValue) } the compiler only says no exact matches in call to…

How do I actually use Iterable?

It took me two full days to successfully wrap my head, and the code, around how to actually use Iterable. You only really need to use it if you work with noncopyable types and noncopyable array storage, and sometimes you can even get away without enabling the experimental Lifetimes feature (but you most likely will need to eventually; its only mentioned once in the proposal). ApproachableConcurrency is something different and isn't related to iterable (and idk what the feature actually does).…

How do I actually use Iterable?

I found plenty of articles explaining its design, but no actual end-to-end code. I've tried: struct MyBorrowingIterator: BorrowingIteratorProtocol { @_lifetime(&self) // '@_lifetime' attribute is only valid when experimental feature Lifetimes is enabled mutating func nextSpan(maxCount: Int) throws(Never) -> Span<UInt8> { // A mutating method cannot return a ~Escapable result return .init() } } Is there a full guide to creating a type? What do I need in the "Package.swift" file? It has…

Getting Started with Swift on Android

A beginner-friendly introduction to the official Swift SDK for Android 1. Introduction For most of its life, Swift was known as the language for iPhone, iPad and Mac apps. That changed with Swift 6.3, which shipped the first official Swift SDK for Android. You can now compile Swift code for Android devices using official tools published on swift.org, instead of relying on unofficial community toolchains. This tutorial walks you through the whole path from zero: what the pieces are, how to…

[Networking Workgroup] Public meeting — Monday, November 9, 2026 — Agenda and call for topics

Swift Networking Workgroup Meeting Notes Meeting Details Date: November 9, 2026 Summary The group agreed to mark the IPAddress enum @frozen and to add byte order initializers to the IP address and Port types. Initial benchmarking tooling will come in and run in shadow mode before the group settles on specific metrics. Francesco presented a WebTransport client and server built on HTTP/3, which led to general agreement that WebTransport, QUIC, and HTTP datagrams should share common abstractions…

Why isn't UserDefaults Sendable?

I suspect it would be easier to create (within Foundation) final class Preferences: UserDefaults, Sendable {} (Preferences by analogy to CFPreferences, also considered AppStorage by analogy to SwiftUI's property wrapper, but feel free to bikeshed) and then anyone who needs Sendable UD can fairly trivially give up subclassing to transition to this instead. Then you could also deprecate UD, if you wanted. You could also consider playing tricks in a major OS SDK update, changing:…

SE-0556: Cell, ConstCell, and Volatile

John_McCall: On the access front, the current proposal is making a valiant attempt at a purely type-based modeling of aliases, but I think this effort would be more successful if we acknowledged that aliased and non-aliased accesses need to be distinguished in the language. The more I think about it, the more necessary I think this general model of aliased storage, borrows, and mutations is for delivering the feature set we really want. Strictly speaking, though, I don't think it needs to block…

Why isn't UserDefaults Sendable?

jmschonfeld: On Darwin platforms this property is declared in an Objective-C header and I'm not certain whether it's possible to add the & Sendable constraint via an Objective-C header on Darwin. I'd expect that adding NS_SWIFT_SENDABLE somewhere there would work, but haven't tried it yet so it may need compiler support. If adding NS_SWIFT_SENDABLE doesn’t work, I believe it would be possible to do… @property (class, readonly, strong) NSUserDefaults *standardUserDefaults NS_REFINED_FOR_SWIFT;…

Why isn't UserDefaults Sendable?

An approach like this does seem plausible. It looks like it may work in most cases, but the 2 things that I can think of that concern me are: On Darwin platforms this property is declared in an Objective-C header and I'm not certain whether it's possible to add the & Sendable constraint via an Objective-C header on Darwin. I'd expect that adding NS_SWIFT_SENDABLE somewhere there would work, but haven't tried it yet so it may need compiler support. Doing this is technically a breaking change…

Why isn't UserDefaults Sendable?

It wouldn't. What Nickolas is asking for is very narrowly scoped: for the standard var to return a composition of UserDefaults & Sendable, taking advantage of what @jmschonfeld said a few posts up about the base class being thread safe. If you were implementing this in Swift 6, you'd write something like: static var standard2: UserDefaults & Sendable { unsafeDowncast( UserDefaults.standard, to: (UserDefaults & Sendable).self ) } Which compiles with no warnings or errors. Idk if this is a good…

SE-0558: Bulk update operations for `MutableSpan` and `MutableRawSpan`

Yeah, so I still feel that copying: doesn't really capture the relationship between this operation and the iterator that it's draining values out of. There ought to be a preposition on the iterator variant, like copyingFrom:, which to me suggests both that the elements are being removed from the iterator and that it might not copy all of the elements from the iterator. If we make that change, I don't think the "all" is really necessary on the iterable variant, because I think collections[1]…