Skip to content
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

Rename next to value #8

Merged
merged 2 commits into from
Sep 15, 2016
Merged

Rename next to value #8

merged 2 commits into from
Sep 15, 2016

Conversation

mdiep
Copy link
Contributor

@mdiep mdiep commented Sep 12, 2016

As discussed in ReactiveCocoa/ReactiveCocoa#3013

I rather like this. I don’t think next is a particularly great name. value seems much better to me.

Observer.sendValue() becomes Observer.send(value: )
Observer.sendFailed() becomes Observer.send(error: )
SignalProducer.startWithNext becomes SignalProducer.startWithValues
SignalProducer.observeNext becomes SignalProducer.startWithValues

`Observer.sendValue()` becomes `Observer.send(value: )`
`Observer.sendFailed()` becomes `Observer.send(error: )`
`SignalProducer.startWithNext` becomes `SignalProducer.startWithValues`
`SignalProducer.observeNext` becomes `SignalProducer.startWithValues`
@mdiep mdiep added the proposal label Sep 12, 2016
@NachoSoto
Copy link
Member

I feel like we're better off leaving breaking changes like this for a version after the initial one for ReactiveSwift. Otherwise it's going to make he transition even more painful.

@andersio
Copy link
Member

This should be easily migrated by API renaming.

@andersio
Copy link
Member

What about shortening the rest of send* to complete and interrupt?

@mdiep
Copy link
Contributor Author

mdiep commented Sep 12, 2016

Yeah, the API renaming makes the transition pretty easy IMO.

@neilpa
Copy link
Member

neilpa commented Sep 12, 2016

I would also think it's better to batch up all the possible churn (even if it's slightly more) than spreading it out into multiple changes.

@liscio
Copy link
Contributor

liscio commented Sep 14, 2016

I'll add my vote to the "break everything now rather than later" pile. Seeing how it's already a huge job to port the growing codebase that I have to swift 3, I might as well get all this renaming handled together in one shot. 😛

@mdiep
Copy link
Contributor Author

mdiep commented Sep 14, 2016

Seems like people are mostly on board with making all the breaking changes now.

Is everyone 👍🏻 on the change itself?

@@ -599,7 +599,7 @@ public final class MutableProperty<Value>: MutablePropertyProtocol {
/// underlying producer prevents sending recursive events.
atomic = RecursiveAtomic(initialValue,
name: "org.reactivecocoa.ReactiveSwift.MutableProperty",
didSet: observer.sendNext)
didSet: observer.send(value:))
Copy link
Member

Choose a reason for hiding this comment

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

👍

@NachoSoto
Copy link
Member

Ship it then! I'm also on board.

@NachoSoto NachoSoto merged commit 2cdbc41 into master Sep 15, 2016
@NachoSoto NachoSoto deleted the value-not-next branch September 15, 2016 21:38
@mdiep
Copy link
Contributor Author

mdiep commented Sep 15, 2016

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants