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

Move Signal and SignalProducer operators to the concrete types. #304

Merged
merged 3 commits into from
Mar 31, 2017

Conversation

andersio
Copy link
Member

@andersio andersio commented Mar 30, 2017

SignalProducer heavily intertwines with Signal at its core, while both SignalProducer and Signal are already pretty generic with refinements & specialisation enabled through closures & type erasure, IMO mitigating the need of another hot signal type. Moreover, Property is not going to conform to either of them due to clashes in base names, even assuming the presence of higher-kinded types in Swift.

So with all these, I do not envision any value of semantic abstraction from these protocols.

The PR does not remove SignalProtocol and SignalProducerProtocol however, since they are still necessary for constraining flattening operators until we have parameterised extensions.

@andersio andersio force-pushed the 3.1-concrete-same-type-req-2 branch from 643e2f0 to 5c07ffa Compare March 31, 2017 15:26
@andersio andersio force-pushed the 3.1-concrete-same-type-req-2 branch from 5c07ffa to 6d5331a Compare March 31, 2017 15:38
@@ -1329,6 +1306,12 @@ extension SignalProducer {
}
}

// FIXME: SWIFT_COMPILER_ISSUE
Copy link
Member

Choose a reason for hiding this comment

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

Yikes, did you file this?

Copy link
Member Author

@andersio andersio Mar 31, 2017

Choose a reason for hiding this comment

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

Copy link
Member Author

@andersio andersio Mar 31, 2017

Choose a reason for hiding this comment

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

For the ambiguity of then, my wild guess is that in concrete extensions, the compiler picks overloads among signatures with generic parameters resolved but no information about their original form. So the more specific overloads are ranked the same as the most generic overload.

@andersio andersio merged commit 59b55e9 into master Mar 31, 2017
@andersio andersio deleted the 3.1-concrete-same-type-req-2 branch March 31, 2017 19:22
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

3 participants