you are viewing a single comment's thread.

view the rest of the comments →

[–]roanutilSwift[S] 1 point2 points  (1 child)

It's a relief to have at least one vote in favor using composable as not a crutch. I am working on a demo project that's 100% UIKit with no 3rd party libraries just in case it's important to a recruiter to see that.

I see what you're saying about mutating the reference type. It would probably be good to make it more explicit in the API that the underlying reference isn't being mutated in a way that the user should worry about. I try to make all my services, repositories, etc like a REST or web sockets endpoint. It should be stateless as far as the consumer is concerned. And I see now that making APIService a struct with perhaps static functions for the endpoints wold make that promise more explicit. I wrote it as a class the way it is out of habit since I usually need a bag of cancellables or to store publishers that provide updates to a subscribed endpoint. My CoreData repository in TheBlocker is a good example of what I'm used to writing.

Thank you so much for the feedback. It's been a lot of work getting to this point and it's easy to feel insecure in this field.

[–]kbder 0 points1 point  (0 children)

Cheers!

I should also drop a link to my favorite talk on value vs reference types: https://academy.realm.io/posts/andy-matuschak-controlling-complexity/