is that what you are looking for?
# rx
k
is that what you are looking for?
w
trying to digest it now
why the use of a sealed class / object rather than enum?
k
Enum is good too. I use sealed hierarchy if in the future I need to allow data to be provided in the stream. IE:
Copy code
data class Loosing(val maxMsToLive: Long) : Connectivity()
also someone correct me if im wrong but it seems to be that
Subject
usage can sometimes be a code smell
Yes, Subject is a code smell from my point of view.. try to hide it from your api
w
do you think its more to hide from the api rather than not to use?
like is it so bad to use a subject or to expose it as a subject?
k
Using a subject is okay, there are good usecasees for it. exposing a subject opens up too many possibilities, hiding it behind your api restricts the usage to your usecase.
w
thank you for the response here - its rare i get to use a switchmap for an actual use
👍 1