why the complex types?

I lot of the frustration I'm having with trying to do simple things in SwiftUI seems to have to do with the complexity of the types of values involved. Type inference failing, and I'm unable to come up with the right types myself. Error messages not localized to where the actual mistake is!


Sure, one can blame me for not completely understanding this, but this is not user friendly.


Why does View need to be a generic protocol? Why all the complexity? Why the hard-to-understand error messages?


Mind you: I've been coding in swift for several years now, so while I'm not an expert, I'm no novice either.

Replies

That's a very complicated answer. It has nothing to do with technology, but more to do with social pressures. Strong types are in fashion right now. There is not much you can do to fight that. It may be another 5 years or so until people switch back to dynamic types. In the meantime, keep studying those types because I can guarantee they will be part of your whiteboard job interviews for the next few years.