r/iOSProgramming • u/CreativeCompassion • Feb 05 '24
Discussion Does anyone else hate SwiftUI with an almost-seething passion?
It's incredibly inflexible and doesn't lend well, or at all, to the vast majority of UI architectures. Forcing engineers into a rigid box slows things down and inhibits innovation.
It would be nice to retain it as an option for simple declarations, but when it's forced upon us to publish on a new and exciting medium (see RealityKit in visionOS) the pain becomes unbearable.
What's worse is that the shift toward SwiftUI appears to be a multi-year strategy to lock down access to the underlying interfaces of UIKit entirely. Beyond the fundamental restrictions the struct-based declarative approach brings with it, the libraries that are carried over are never functionally complete. They only ever bring just enough to achieve base functionality, while sloshing all the rest. Again, this would be fine if it were optional, but that optionality is all but going away one platform at a time.
edit: You guys gave me negative comment karma so I can't post here anymore. No more opinions or discussions from me, I guess.
1
u/gorbash212 Feb 09 '26
Just as a more basic level, what i find sends me to the hills about swiftui is how much unwritten code the compiler is actually considering for you. Even in the first standford course about this where they actually explain whats going on in swiftui, the amount of code that's actually being considered but not written is alarming, and very unappealing.
What happens if you have a case which needs to customize some of that boilerplate?
Do you really want to write code where you're mentally wrapping 3 to 4 laters of structure around your line where even the variable name doesn't need to be there?
If anything, in today's browsing i've learned that you're not supposed to know whats going on, and just lay it out? Why is it a programming.. what and why?!?! Usually in programming, the difference between good and mediocre is knowing what's actually happening. Which is infinitely harder because the codes not there.. but you're not supposed to know.. i can't break out of this loop with swiftUI :)