Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Conversation

@bspath-work
Copy link
Contributor

Additional changes for RxSwift.

This integer updates when foo happens to bar and is subscribed to.
Subscribe to this observable to get a predefined initial value and subsequent changes.
*/
myIntegerStream: Observable<Int> { get }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During our discussion we seemed to decide not to make distinction in the naming between cold and hot observables, but only document underlying behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this proposal is clearer. Also, I suspect the number of instances in which we make use of observables that require subscriptions to update is going to be small to non-existent.

Copy link
Contributor

@Granfalloner Granfalloner Dec 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is going to be small to non-existent.

This is an overstatement. A lot of things can be modeled as a cold observable - e.g., network api request, user-initiated actions, etc.

bspath-work and others added 4 commits December 13, 2019 11:25
Co-Authored-By: Vasyl Myronchuk <granfalloner@gmail.com>
Co-Authored-By: Vasyl Myronchuk <granfalloner@gmail.com>
Co-Authored-By: Vasyl Myronchuk <granfalloner@gmail.com>
Co-Authored-By: Vasyl Myronchuk <granfalloner@gmail.com>
This integer is updated when foo happens to bar.
Subscribe to this observable to get its current value and subsequent changes.
*/
myIntegerStream: Observable<Int> { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
myIntegerStream: Observable<Int> { get }
var myIntegerStream: Observable<Int> { get }

myIntegerStream: Observable<Int> { get }

// Defining a raw value is not preferred and should only be done in rare cases.
myInteger: Int { get }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
myInteger: Int { get }
var myInteger: Int { get }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants