As an early adopter of SwiftUI, this hasn't been my experience—but I understand that a lot of people struggle with it. I think it's pretty opinionated, and if you stick to the "preferred" way of doing things, life is easier.
The biggest (and known) issue with SwiftUI is the complex error messages you get, and the fact that the type checker will give up and ask you to break up your view into "distinct sub-expressions." Really the issue is almost never the complexity of a view, but some simple syntax error (passing the wrong type to a function, etc).
Yeah. My understanding is the design of type inference is flawed and requires exponential complexity to resolve and it’s not fixable without breaking change.
Why this is not a top priority before literally anything else?
Yeah. I have a bunch of code with bog-standard linear algebra classes (vec2, vec3, mat2, ...). No generics, no nothing. Just simple classes with operator overloading.
After the recent minor XCode upgrade, Swift can't deduce the type for an expression `((v2 * scalar1) * v3)`, I have to split `let tmp1=v2*scalar1` for it to work.
As a user, I couldn’t care less about the algorithmic beauty of the type system if it works, lets me type complex things reliably, and is fast enough to stay out of my way. Does it do that by being a mess of duct table and plywood? Totally fine for me.
And yet TypeScript doesn't fail with a cryptic nonsensical error just because you have the impossible component with an unfathomable number of two nested lists, like in SwiftUI.
No, I'm saying it has a worse system than Swift's. The point I'm making is that they've designed things such that the normal case doesn't hit this, while Swift keeps adding APIs that exercise the worst of their type system.
The biggest (and known) issue with SwiftUI is the complex error messages you get, and the fact that the type checker will give up and ask you to break up your view into "distinct sub-expressions." Really the issue is almost never the complexity of a view, but some simple syntax error (passing the wrong type to a function, etc).