Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request For Feedback: Swift 5 Result type #40

Open
designatednerd opened this issue Mar 28, 2019 · 6 comments
Open

Request For Feedback: Swift 5 Result type #40

designatednerd opened this issue Mar 28, 2019 · 6 comments
Assignees

Comments

@designatednerd
Copy link
Contributor

designatednerd commented Mar 28, 2019

Should we consider adopting the Swift 5 Result type instead of rolling our own NetworkResult?

Might be nice to use generics instead of a separate result type for images as well.

COMMENTS FIIIIIIIIIIGHT!

@designatednerd
Copy link
Contributor Author

I think this could be a good idea. There are some affordances for transforming Result in Swift 5 that could be really useful to callers, and I feel like if there's a standard lib way of doing something extremely similar to what we're already doing, we should probably use that instead of a custom one.

@designatednerd
Copy link
Contributor Author

@elland @csdodd @yuliaveres thoughts?

@yuliaveres
Copy link

agree to what @designatednerd says. Would be good to explore Result.

@csdodd
Copy link
Contributor

csdodd commented Mar 29, 2019

I am afraid there will be no comments fight. Looks like Result can easily be swapped in and I don't see any disadvantages of doing so.

@designatednerd
Copy link
Contributor Author

🙃 Y'all are no fun whatsoever.

I'll try to work on a PR for this either today or Monday.

@elland
Copy link
Collaborator

elland commented Apr 2, 2019

Not sooo sure about easily swapped in, without losing some information. I think the solution for that might be to expand TeapotError to include the results, request data, etc as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants