Open kalexmills-splunk opened 2 years ago
I don't think that either of these are particularly useful, except as type conversions. The name should change to Merge
. Open to other thoughts.
One annoyance to note about the Combine[S,T,U any]
func is that the author of combiner
has to handle missing values of S
or T
whenever one of the channels closes before the other.
I would close this issue but I'll leave it open in case anyone else has something to add.
Currently, Combine requires the caller to structure their code so as to unify the types involved. This is just one option; another is to use a signature like the below:
...along with a generic Pair type....
But I don't think this package should introduce a generic
Pair
type. This would also require blocking one half of a combined pipeline in order to allow the other to catch up, which can, of course, get a teeny bit fraught.Yet another, more viable option is:
It's unclear whether either of these API options are better than having the caller align on a unified type as part of pipeline stages upstream. They both introduce some additional complexity.