Malcolm Hall

@malhal
128 Followers
134 Following
295 Posts
iOS developer, traveller, guitarist, home brewer, academic researcher with a Ph.D. in Computer Science from the University of Glasgow. #SwiftUI #SwiftData
Bloghttp://www.malcolmhall.com

Reported a terrible NSViewRepresentable animation bug which probably is why List and Table are so flakey on macOS.

FB22270146

https://github.com/feedback-assistant/reports/issues/776

#SwiftUI

Niki Tonsky (@[email protected])

New blog post! A close look at Tahoe menu icons. With 109 illustrations! https://tonsky.me/blog/tahoe-icons/

Mastodon

idk if i'm the minority in this, but i never liked the "icon for every item in menus"

it's extra noise to me.

Apple always felt like one of the hold outs on this. I could always reference them when I had this design argument.

But now with tahoe, they gave in and I feel increasingly isolated on my island of "exclude icons in context menus"

@helge Views are immutable value types. States are mutable value types. The day 1 objects were for model data, there wasn't even a way to have a view own an object without an error-prone onAppear/onDisappear dance. But people insisted on not learning state struct mutating func and we ended up with StateObject and now the mess we have today of people using State with @Observable class.
@dinesharjani cool let me know if you have any problems

@swiftandtips If you do:

@Observable class ProductStore: ObservableObject {

Then you can continue to use @StateObject. Because using @State with class leaks heap memory, it's designed for value types only.

You can simply think of @Observable as a replacement for @Published. Not as a replacement for ObservableObject because that is needed for @StateObject, i.e. a source of truth object with lifetime linked to UI on screen.

@helge it is quite amazing how many refuse to learn @.Binding or struct's mutating func and instead use custom view model objects and run into all kinds of consistency errors and memory leaks, the kind which SwiftUI's value-type-based design was intended to prevent.

I also wrote a deep dive on the evolution of the project—from failed KeyPath experiments and memory leak traps to the final "Shadow Storage" design that powers the library today, read it here:

https://www.malcolmhall.com/2026/01/20/the-evolution-of-a-swift-macro-building-swift-streamable-actors/

The Evolution of a Swift Macro: Building Swift Streamable Actors – Malcolm Hall

🚀 I just released Swift Streamable Actors v1.0!

If you’ve ever wanted to observe changes to a Swift Actor's state as an AsyncStream without writing 30 lines of boilerplate for every property, this macro is for you.

Key highlights: ✅ 100% Type-safe (no type-erasure/AnyKeyPath) ✅ Memory safe (static factories avoid strong reference cycles) ✅ Clean API: @Streamable does it all.

Check out the code: https://github.com/malhal/swift-streamable-actors

#SwiftConcurrency #SwiftMacros #OpenSource

GitHub - malhal/swift-streamable-actors: Streamable Actors for Swift

Streamable Actors for Swift. Contribute to malhal/swift-streamable-actors development by creating an account on GitHub.

GitHub
Centralising sheets works great until you need an alert or fullscreenCover. You’re still at the mercy of the framework to avoid simultaneous presentations. It’s getting better, but it’s still far from perfect—especially since it often fails to set states back to their correct opposites..