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

Tweak unidirectional binding protocols. #359

Merged
merged 1 commit into from
May 5, 2017
Merged

Tweak unidirectional binding protocols. #359

merged 1 commit into from
May 5, 2017

Conversation

andersio
Copy link
Member

@andersio andersio commented May 4, 2017

  1. Replace the observe(_:during:) requirement in the BindingSource protocol with a SignalProducer representation.

    If Generic n-ary producer operators for n > 1. #351 is accepted, BindingSource would adopt arbitrary constraint on associated types and conditional conformances in Swift 4:

    public protocol BindingSource: SignalProducerRepresentable where Error == NoError {}
    extension SignalProducer: BindingSource where Error == NoError {}
    // ... etc.

    While this is breaking, observe(_:during:) is not expected to be publicly used.

  2. Move <~ into BindingTargetProvider.

    The SignalProducer representation and the BindingTarget are sufficient points of customisation, and apparently there would not be an alternative semantic of <~ to override for in the context of these two protocols.

@mdiep mdiep merged commit 616b7bf into master May 5, 2017
@mdiep mdiep deleted the binding-source branch May 5, 2017 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants