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

Rename ZSchedule to Schedule #2242

Merged
merged 2 commits into from Nov 18, 2019
Merged

Rename ZSchedule to Schedule #2242

merged 2 commits into from Nov 18, 2019

Conversation

adamgfraser
Copy link
Contributor

Resolves #2054.

@mschuwalow
Copy link
Member

You are fast :D

mschuwalow
mschuwalow previously approved these changes Nov 15, 2019
@regiskuckaertz
Copy link
Member

Can I ask why the renaming? The Z prefix is kind of a theme to indicate that this is the most powerful version of a type, usually with the R, E, A trifecta.

@adamgfraser
Copy link
Contributor Author

@regiskuckaertz I think the idea is that to use the "Z" nomenclature there should be sufficient use of the "non-Z" variant. So like for ZIO both IO[E, A] and ZIO[R, E, A] are very commonly used types so it makes sense to have type aliases to distinguish them. In contrast for Schedule with the recent changes the number of Schedule instances that don't use any environment type is quite small. So it makes sense to just have one type that does all the things you need to improve discoverability and avoid questions about "why doesn't schedule do X"?

@regiskuckaertz
Copy link
Member

regiskuckaertz commented Nov 16, 2019

Gotcha. I think we should take a look at all the data structures perhaps to be consistent? I’m always flummoxed by the missing ZQueue constructors, All found in the Queue object instead.

@adamgfraser
Copy link
Contributor Author

That's a great point. I think the principle should be that all types have corresponding objects and that the object should include all combinators that make sense for the constraints on the R and E parameters. So in particular ZQueue should have a companion object and it should include all the methods available in the Queue object plus possibly additional methods that deal with the R type. That would be a great first issue.

@jdegoes
Copy link
Member

jdegoes commented Nov 16, 2019

@regiskuckaertz 💯 That needs cleaning up.

@adamgfraser 👍

Copy link
Member

@jdegoes jdegoes left a comment

Choose a reason for hiding this comment

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

Looks great to me, the only thing I might do is add a ZSchedule type alias in the package object that is deprecated for 1.0.

@adamgfraser
Copy link
Contributor Author

All set.

@ghostdogpr ghostdogpr merged commit 63f97b9 into zio:master Nov 18, 2019
Twizty pushed a commit to Twizty/zio that referenced this pull request Nov 18, 2019
* rename ZSchedule to Schedule

* add type alias
@adamgfraser adamgfraser deleted the 2054 branch November 19, 2019 05:10
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.

Rename ZSchedule to Schedule
5 participants