Will there be a `filterIsInstance` method availabl...
# coroutines
a
Will there be a
filterIsInstance
method available for
ReceiveChannel
? If not, should I propose one as a PR? on KEEP or on the main repo?
v
There isn’t any because it’s easy to implement using existing
filter
method. We’d like to avoid having dozens of Rx-like operators, especially with channels, which differ from Rx/reactor/akka cold streams
a
Well, my thoughts were that might not be the case because
filterIsInstance
is already on
CollectionsKt
, though rx offers
ofType<T>
, it might be a pretty common operator
But you’re right its pretty easy to achieve with filter/map, it just seems unnecessary