You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This codebase likes to shift back and forth between various nomenclature for various actors. It's not clear whether to call a consumer of values a Subscriber or an Observer. The trait's name is Observer:
This agrees with ReactiveX documentation elsewhere (Ex: It's most popular implementation RxJS), though this isn't as consistent as we might hope. Throughout the code, tests/ docs instances of observers are often called subscribers. rxRust should endeavor to choose one name and stick with it everywhere.
Is the following subscriber is actually an observer? It seems to implement the Observer trait.
let o = observable::create(|subscriber| {
subscriber.complete();})
The docs also often refer to Subscriptions or SubscriptionLike as Subscriber meaning that sometimes Subscriber means Observer and sometimes it means SubscriptionLike. For example:
/// Returns a new Observable that multicast (shares) the original/// Observable. As long as there is at least one Subscriber this/// Observable will be subscribed and emitting data.
Subscribing with an Observer, returns a SubscriptionLike (via SubscriptionWrapper) and it's ostensibly this Subscription that determines how long an Observable lives.
I'm not sure I get all the nuance at work here, but I think some tightening of the common vernacular might help!
The text was updated successfully, but these errors were encountered:
@Trequetrum sorry for the too late replay, I'm busing work on another library and forget this thread before.
Subscribing with an Observer, returns a SubscriptionLike (via SubscriptionWrapper) and it's ostensibly this Subscription that determines how long an Observable lives.
Yes, you're right.
Subscriber is an object both implement SubscriptionLike and Observer.
And In this month I refactor rxRust in #215, and I think it's more clear. Only three major trait Observer, Observable and Subscription, and Subscriber is a struct both implemented Observer and Subscription.
This codebase likes to shift back and forth between various nomenclature for various actors. It's not clear whether to call a consumer of values a Subscriber or an Observer. The trait's name is Observer:
This agrees with ReactiveX documentation elsewhere (Ex: It's most popular implementation RxJS), though this isn't as consistent as we might hope. Throughout the code, tests/ docs instances of observers are often called subscribers. rxRust should endeavor to choose one name and stick with it everywhere.
Is the following subscriber is actually an observer? It seems to implement the Observer trait.
The docs also often refer to
Subscriptions
orSubscriptionLike
asSubscriber
meaning that sometimes Subscriber means Observer and sometimes it means SubscriptionLike. For example:Subscribing with an
Observer
, returns aSubscriptionLike
(viaSubscriptionWrapper
) and it's ostensibly this Subscription that determines how long an Observable lives.I'm not sure I get all the nuance at work here, but I think some tightening of the common vernacular might help!
The text was updated successfully, but these errors were encountered: