-
Notifications
You must be signed in to change notification settings - Fork 114
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
Towards 1.0.0
: Deprecate all the ZValidation
operators implying "parallelisation" in their names
#1433
base: series/2.x
Are you sure you want to change the base?
Conversation
…mplying "parallelisation" in their names zio-prelude `1.0.0` roadmap: #1359 - `&>` deprecated in favour of `*>` - `<&` deprecated in favour of `<*` - `<&>` deprecated in favour of `<*>` - `toZIOParallelErrors` deprecated in favour of `toZIOAccumErrors` - `zipParLeft` deprecated in favour of `zipLeft` - `zipParRight` deprecated in favour of `zipRight` - `zipPar` deprecated in favour of `zip` - `zipWithPar` deprecated in favour of `zipWith`
…lying "parallelization" in their names zio-prelude `1.0.0` roadmap: #1359 - `&>` deprecated in favour of `*>` - `<&` deprecated in favour of `<*` - `<&>` deprecated in favour of `<*>` - `toZIOParallelErrors` deprecated in favour of `toZIOAccumErrors` - `zipParLeft` deprecated in favour of `zipLeft` - `zipParRight` deprecated in favour of `zipRight` - `zipPar` deprecated in favour of `zip` - `zipWithPar` deprecated in favour of `zipWith`
1.0.0
: Deprecate all the ZValidation
operators using or implying "parallelisation" in their names1.0.0
: Deprecate all the ZValidation
operators implying "parallelisation" in their names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I just now realize what your problem with the names was and what's going on.
I don't have a super strong opinion on this and don't want to block you if you do and know what you're doing.
But, I just realized that the names are not arbitrary. They're very intentionally chosen. The point of the *Par
naming is that it combines two instances that the two are evaluated independently of each other. As in, the evaluation of one doesn't depend/wait on the result of the other.
Thus, the name Par
fits very well. Not in the sense that they are executed in parallel (and thus we get the final answer faster), but in the sense of semantic parallelism. And so I'd be more inclined to keep the naming (likely used in other parts of the codebase).
Hey 🙂
I'm sorry but I don't know what "semantic parallelism" means. It seems to me that this is sequential, pure code. @ghostdogpr @kyri-petrou Any opinion? |
See https://typelevel.org/cats/typeclasses/parallel.html, it's meant to be "parallel composition". I agree it's a bit confusing at first but I got used to it so I don't have a strong opinion. |
Yeah, I know this type of class, but I always thought this name was terrible. It seems to me that the important word in this Cats doc is "accumulating":
So we could maybe reflect this notion in the name. We have an "Accumulative Applicative" behaviour. So maybe a better would be |
I don't think it's about "accumulation". I think the point is independence. When I write "semantic parallelism" I think of independence. When A and B are composed in a semantically parallel and thus independent manner, the result of A is not used to compute the result of B. I consider this an important and name-worthy property. But maybe "Parallel" is not the best name. Could we think of others?
I can't think of anything better that that, but maybe you'll find these links inspirational https://www.google.com/search?channel=fs&q=synonym+to+parallel https://www.google.com/search?channel=fs&q=synonym+to+independent |
I don't think that independence is what matters in this computation. I can compute A and B independently and only give you back B (which could also be the result of To me, what matters is the end result: what is this function giving me back? What is this function doing? I'd like to suggest this alias
|
zio-prelude
1.0.0
roadmap: #1359&>
deprecated in favour of*>
<&
deprecated in favour of<*
<&>
deprecated in favour of<*>
toZIOParallelErrors
deprecated in favour oftoZIOAccumErrors
zipParLeft
deprecated in favour ofzipLeft
zipParRight
deprecated in favour ofzipRight
zipPar
deprecated in favour ofzip
zipWithPar
deprecated in favour ofzipWith
@ghostdogpr @kyri-petrou Actually we have this issue a bit everywhere in prelude code.
These
for example uses thisPar
naming too while it doesn't parallelize anything:🤔