Replies: 6 comments
-
I'll close this issue, since at this point I'm sure it's not the right thing to do. The only question that remains open is how to explicitly generalize for parallel operations. ParallelArray was an attempt, but it doesn't include traverses and as it is an array, it only works for computations of the same type. Maybe we should add parallel tuples? For the moment I would leave things as they are, unless someone have a better idea. Feel free to re-open. |
Beta Was this translation helpful? Give feedback.
-
I think we should create a parallel async wrapper type for So we can use it like this:
Also
maybe we can add a specific workflow
|
Beta Was this translation helpful? Give feedback.
-
I was thinking that another route is to add specific functions, like a Anyway, this doesn't prevent us to implement the wrapper above. It's just another way to achieve the same, I mean there is some overlap but it could be convenient in some situations. Note that this is a bit more aligned with the current F# way, the problem with this approach is that you hit a limit when you want to do more stuff than sequence or traverse, like applicatives. It's interesting to note that applicative notation it's likely to be shipped in the next F# version, although it won't have implicit parallel semantics. How is the F# world going to deal with that? I don't know. |
Beta Was this translation helpful? Give feedback.
-
How will the applicative notation look in f#? |
Beta Was this translation helpful? Give feedback.
-
They will just add some keywords for CEs like |
Beta Was this translation helpful? Give feedback.
-
Yes, that could turn out interesting for async behavior. |
Beta Was this translation helpful? Give feedback.
-
Should
sequenceA [|x;y;z|]
(for x, y and z asyncs) be semantically equivalent toAsync.Parallel [|x;y;z|]
?The operations are equivalent and currently will yield the same results, but
sequenceA
(ortraverse id
) will execute each async in sequence. Well that's probably what the name means ;)The same way it is possible to implement a specific instance for
zip
where it zips two asyncs in parallel, but the question is: is it the right thing to do?Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions