Beware of specifying isolation requirements for whole protocols

Matt Massicotte has a well-written, brief introduction to isolation in Swift. But it mostly just enumerates the state of things, without offering much guidance. One pitfall in particular is important to call out, regarding isolated protocols. These might seem pretty similar – you’d be forgiven for assuming it’s just a convenience to put @MainActor on… Read more

A brief introduction to type memory layout in Swift

Most of the time we Swift programmers don’t really think about how our types – structs, classes, actors, enums, etc – are represented in memory. We just deal with them abstractly, knowing that somehow the compiler boils them down to a bunch of bytes, handling all the complexity of wrangling those bytes for us. However,… Read more

Swift `print` takes multiple arguments

I forget this too often, and write things like: Sometimes I feel like I’m really just writing stress-tests for the Swift syntax parser. The above can actually be written a bit more simply, as: Not just fewer characters, but conceptually simpler – fewer nested parenthesis, and no nested string literals at all. See, print‘s function… Read more

Apple Vision Pro first impressions

Apple PR photo of the Apple Vision Pro viewed from the front.

This morning I tested out Apple’s Vision Pro in an Apple Store. And I’ve decided to write about it, mostly for my own future nostalgia, but also because my experience was markedly different to what’s been widely reported in tech news. I had intended to just buy an Apple Vision Pro on release day, but… Read more

Hiding SwiftUI views

There are several ways to hide a SwiftUI view, although they don’t all agree on what it means to hide the view. Do you want it to be invisible, or actually not there? To make it invisible you need only set its opacity to zero or use the hidden modifier. But the view will still… Read more

Proactive Peek & Reveal on Edge Hover

Screen capture video showing an attempt to grab the scroll handle and how it's foiled by Proactive Peak stealing the click away to resize a previously-closed sidebar.

These are two misfeatures that appeared in macOS Sonoma (I believe). They are where a closed sidebar forces its way back into view temporarily, if the mouse comes to rest near the relevant edge of the window. It’s easy to see how some UI designer thought this was a good idea. Surely if you move… Read more