Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@reibitto
Copy link
Contributor

@reibitto reibitto commented Oct 4, 2019

I stumbled upon this because I wanted to avoid constructing an unnecessary error object when doing something like someSuccessfulIO.asError(createError(...)). But I also noticed ZIO.as is currently call-by-name but not asError. So seems like a good thing to do for consistency's sake anyway.

I noticed this same mismatch in ZSink.

Copy link
Member

@iravid iravid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @reibitto!

@jdegoes
Copy link
Member

jdegoes commented Oct 4, 2019

I think for consistency reasons this makes sense. One can debate whether or not it should be eager or by name, but by name at least affords tracing potential.

@jdegoes jdegoes merged commit 8c7da80 into zio:master Oct 4, 2019
@jdegoes
Copy link
Member

jdegoes commented Oct 4, 2019

Thank you! 🙏

neko-kai added a commit to 7mind/zio that referenced this pull request Oct 4, 2019
Twizty pushed a commit to Twizty/zio that referenced this pull request Nov 13, 2019
Twizty pushed a commit to Twizty/zio that referenced this pull request Nov 13, 2019
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

Successfully merging this pull request may close these issues.

3 participants