News for hackers. Stuff that matters.
Re:9 years of Apple text editor solo dev by jimbokun on Friday January 05, 2024 @11:32AM (#38880939)
When I tried using SwiftUI, the performance for scrolling through lists past a certain size was very painful. I guess there were ways to mitigate this slowness, but they were very unintuitive and did not give me confidence in the developers commitment to keeping apps snappy and responsive.

The APIs for NSTableView and NSCollectionView, in contrast, were always very responsive and performant when used in the default way.

All of this greatly reduced my trust in SwiftUI. Seems like they did not have performance in mind in the core design decisions of the framework, and only tested it on small data sizes.

Maybe things have improved since then.

Re:9 years of Apple text editor solo dev by jshier on Friday January 05, 2024 @11:48AM (#38881176)
No, List still has some awful performance cliffs unless you go out of your way to model your infinite lists in a way it can handle. There are some nice UI / NSTableView / CollectionView wrappers nowadays though.
Re:9 years of Apple text editor solo dev by interactivecode on Friday January 05, 2024 @12:42PM (#38881983)
The great strength of SwiftUI is that until they have caught up with UIKit and AppKit you can just drop down to those frameworks. So you can use SwiftUI in 95% of your app and where you run into limitions you can use the lowerlevel NSCollectionView for example. Whats even cooler is that inside that NSCollectionView you can just use SwiftUI views again.
Re:9 years of Apple text editor solo dev by mac-mc on Friday January 05, 2024 @03:26PM (#38884399)
That has some unique edge cases as we have been discovering when you interleave UIKit and SwiftUI together.

I kind of wish that SwiftUI was a clean break in some ways and did not depend on UIKit and avoid all the abstraction leak issues that have been arising as a result. I know that would never happen in practicality although.

Re:9 years of Apple text editor solo dev by lenkite on Friday January 05, 2024 @02:32PM (#38883610)
I wish Apple had stuck to Model-View-Controller instead of shoehorning React philosophy into their native UI framework. Personally, I find the "old-school" way of doing things far easier to follow and understand.
Re:9 years of Apple text editor solo dev by raydev on Friday January 05, 2024 @04:05PM (#38884930)
The existing UIViewController and how it's implemented breaks the model-view-controller pattern, so there was nothing to stick to.
Re:9 years of Apple text editor solo dev by dangwu on Friday January 05, 2024 @06:41PM (#38886617)
React is popular for a reason. Declarative UI is a million times easier to implement and maintain. If a total newbie had to learn UIKit and SwiftUI then pick one, they'd pick SwiftUI 100% of the time.
Re:9 years of Apple text editor solo dev by jimbokun on Monday January 08, 2024 @02:03PM (#38916534)
Until the input data gets larger and the performance grinds to a halt.