31 posts tagged ‘Swift Programming Language’
Watch Out for Counterintuitive Implicit Actor-Isolation
Jared Sinclair: I ran into some unexpected runtime crashes recently while testing an app on iOS 18 compiled under Swift 6 language mode, and the root causes ended up being the perils of using @unchecked Sendable in combination with some counterintuitive compiler behavior with implicit actor isolation.[…]What occurred to me instead was to find a […]
Swift Vision: Improving the Approachability of Data-Race Safety
Holly Borla (via Mastodon, forum): This document lays out several potential paths for improving the usability of Swift 6, especially in simple situations where users aren’t intending to use concurrency at all. […] A key tenet of our thinking in this vision is that we want to drastically reduce the number of explicit concurrency annotations […]
Swift Concurrency Proposal Index
Quinn (via Fatbobman): This post summarises the Swift Evolution proposals that went into the Swift concurrency design. It covers the proposal that are implemented in Swift 6.0, plus a few additional ones that aren’t currently available.The focus is here is the Swift Evolution proposals. For general information about Swift concurrency, see the documentation referenced by […]
Problematic Swift Concurrency Patterns
Matt Massicotte: I think the vast majority of the time, a global actor should be applied to the type as a whole, not to individual properties.[…]But, while detached does prevent isolation inheritance, it also does other stuff too. Detached tasks do not inherit priority or task-local values. Instead, think about a nonisolated function.[…]I think MainActor.run […]
Swift Proposal: Integer Generic Parameters
SE-0452 (via Steve Canon): Swift does not currently support fixed-size or fixed-capacity collections with inline storage. (Or at least, it doesn’t do so well, not without forming a struct with some specific number of elements and doing horrible things with withUnsafePointer to handle indexing.) Most of the implementation of something like a fixed-size array, or […]
How to Use Cursor for iOS Development
Thomas Ricouard: Recently, there’s been much talk and fuss about AI, and whether or not it can improve your development workflow. I wanted to touch base about how AI and its implementation in Cursor have been significantly improving my speed and efficiency. In short, Cursor is a fork of VSCode with many code editing AI-assisted […]
exit(173) Receipt Fetching Deprecated on Sequoia
Jeff Johnson (Mastodon): [If] you compile your app with the macOS 15 SDK in Xcode 16, and your app exits with the status 173—the traditional way to handle Mac App Store receipt validation failure—then macOS 15 Sequoia will show the user an alert[…]The alert is terrible for at least two reasons. First, the text is […]
Swift Protocol Requirement Quirks
Jesse Squires: A handful of protocol witness mismatches are currently allowed:Non-failable initializers can satisfy failable initializer protocol requirements (as I encountered above)Non-throwing functions can satisfy throwing function protocol requirementsNon-escaping closure parameters can satisfy @escaping protocol requirementsGeneric functions can satisfy non-generic protocol requirementsNon-mutating functions can satisfy mutating protocol requirementsEnum cases can satisfy static function protocol requirementsSynchronous […]