logoalt Hacker News

saagarjhatoday at 11:44 AM1 replyview on HN

SwiftUI has a bunch of problems but almost none of them have anything to do with what this guy has to say :( Like, there are issues with almost every point:

> We started with @State, @Binding, and ObservedObjects. Then Apple realized the performance was disastrous and SwiftUI was re-rendering views all the time. That’s when it introduced the Observation framework and the @Observable macro. They tried to solve the problem with compiler tricks, but it clearly wasn’t enough so the layout engine continued its guessing games.

Not why @Observable was introduced

> In SwiftUI, you can never know for sure how many times a view will update and, when it does, why it chose to.

Instruments tells you these days

> That demo project from the SwiftUI tutorial has a very standard, non-custom one. You build the project with the latest Xcode and launch the app on the latest macOS—only to get this.

Yeah, it's a demo marked as "this is old, please do not use it"?

> What is a SwiftUI problem is the overall fragility of UI layouts. They fall apart in the most unexpected ways and at the most unfortunate moments. You can see it in the very real, production apps like UTM. It’s a fantastic piece of engineering, but its reliance on SwiftUI sometimes makes it feel like an early prototype.

This is an app written by someone who spends most of their time writing graphics APIs I think the fact that they can do something half-decent is really a testament to how approachable SwiftUI is

> In the end, you find yourself wrapping everything in a GeometryReader. And this is the ultimate admission of defeat.

No I only use GeometryReader when I actually want to do some coordinate math

> Okay, maybe you want to let your users customize the window toolbar, just as they could since 2001 (or something like that). Well, SwiftUI received this “breakthrough” feature only a few years ago.

iOS 14 my guy, this is literally one year after SwiftUI was released

> And then there’s the most basic task: displaying images you fetched from the network. Well, you better write your own fetcher, because AsyncImage was introduced only in iOS 15.

Can you point me at the API in UIKit that lets you do this?

> But if you want to also cache those images, I’ve got bad news for you: You can’t do it at all because right now, in July 2026, this API is still in beta.

Or this?

> For all these scenarios, developers usually come up with their own hacks and workarounds.

Yeah, it's called "you download one of a handful of libraries to do it for you". Now you don't have to do that.


Replies

blkhp19today at 6:27 PM

This should be the highest-rated comment. The guy who posted this video / transcript is wrong about so many things - I'm actually convinced he's being purposely misleading. It's an opinion about SwiftUI backed up by misleading and inaccurate claims.