-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Provide combineLatest overload with vararg flow parameter #1193
Comments
I'd suggest to provide type-safe overloads up to N (5-8 TBD) parameters all based on internal implementation that uses varargs and is not typesafe to save bytecode size. There is no better solution as it seems until Kotlin implements "variadic generics" (https://youtrack.jetbrains.com/issue/KT-31427) |
* combineLatest(Iterable<Flow<T>>) is not added deliberately, use-case is unclear * All specific overloads are marked as inline to reduce binary compatibility pressure Fixes #1193
* combineLatest(Iterable<Flow<T>>) is not added deliberately, use-case is unclear * All specific overloads are marked as inline to reduce binary compatibility pressure Fixes #1193
Once you start combining more than two Flows, does it make more sense to have combineLatest() as a standalone function rather than an extension method? |
See the original request with rationale: #437 (comment)
The key question is how (if) to provide a type-safe API.
Whether we need up to N overloads with N generic parameters or single vararg parameter of type
Flow<*>
The text was updated successfully, but these errors were encountered: