{"action":"reopened","number":2911,"pull_request":{"url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/2911","id":70698611,"html_url":"https://github.com/ReactiveCocoa/ReactiveCocoa/pull/2911","diff_url":"https://github.com/ReactiveCocoa/ReactiveCocoa/pull/2911.diff","patch_url":"https://github.com/ReactiveCocoa/ReactiveCocoa/pull/2911.patch","issue_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2911","number":2911,"state":"open","locked":false,"title":"Property composition and enhancements","user":{"login":"andersio","id":11806295,"avatar_url":"https://avatars.githubusercontent.com/u/11806295?v=3","gravatar_id":"","url":"https://api.github.com/users/andersio","html_url":"https://github.com/andersio","followers_url":"https://api.github.com/users/andersio/followers","following_url":"https://api.github.com/users/andersio/following{/other_user}","gists_url":"https://api.github.com/users/andersio/gists{/gist_id}","starred_url":"https://api.github.com/users/andersio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersio/subscriptions","organizations_url":"https://api.github.com/users/andersio/orgs","repos_url":"https://api.github.com/users/andersio/repos","events_url":"https://api.github.com/users/andersio/events{/privacy}","received_events_url":"https://api.github.com/users/andersio/received_events","type":"User","site_admin":false},"body":"Here is an implementation of the #2841 proposal, seeking for your comments.\r\nSwift 3.0 is not required.\r\n\r\n#### Objective\r\nThis PR aims to introduce new composition operators on `PropertyType`.\r\n\r\nOn the other hand, `AnyMutableProperty` is introduced for users who would like to build higher level constructs that operate on the `MutablePropertyType` abstraction. An example would be two-way bindings between two `MutablePropertyType`s.\r\n\r\n#### Implementation\r\nThis PR carries breaking changes to those who have custom implementations of the `PropertyType` protocols.\r\n\r\n##### Type-erasing wrappers\r\n1. `AnyProperty` now uses a private, type erasing box.\r\n2. A new type erased wrapper `AnyMutableProperty`.\r\n3. The producer and the signal of an `AnyProperty` now completes only when the source has completed.\r\n\r\n##### Protocols\r\n4. Introduce `withValue` and `modify` in the protocols.\r\n5. `value` and `swap(newValue:)` are now protocol extension methods.\r\n\r\n##### Property Composition\r\n1. New combining operators: `combineLatest` and `zip`\r\n2. New value operators: `combinePrevious`, `skipRepeats` and `uniqueValues`\r\n3. New flattening operators: `flattenLatest` and `flatMapLatest`\r\n\r\n##### Miscellaneous\r\n1. Separated the `DynamicProperty` tests from the rest of the PropertySpec. \r\n2. Reorganised the `Property.swift`, with protocols & protocol extensions at the top, followed by implementations, bindings and finally the private utility classes.\r\n\r\n#### Caveats\r\n##### Type erasing boxes\r\nThe current closure approach cannot be expressed non-escaping blocks and rethrowing functions in Swift 2.2 so far, and Swift 3 has tackled only one of them so far. Without these, `withValue` and `modify` cannot be brought to the protocols.\r\n\r\nIn the future (post Swift 3.0), these wrappers should be replaceable by typealiases of a generalised existential type without breaking any user code.\r\n\r\n-\r\nEdited on 21 May 2016","created_at":"2016-05-19T13:57:57Z","updated_at":"2016-05-22T10:19:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4632f44d57b05a0547bcd8631a014a45361c7c9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/2911/commits","review_comments_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/2911/comments","review_comment_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2911/comments","statuses_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/statuses/a96415caea149bdb96236e06b4bbfc7d3f3c1de6","head":{"label":"andersio:property-v2","ref":"property-v2","sha":"a96415caea149bdb96236e06b4bbfc7d3f3c1de6","user":{"login":"andersio","id":11806295,"avatar_url":"https://avatars.githubusercontent.com/u/11806295?v=3","gravatar_id":"","url":"https://api.github.com/users/andersio","html_url":"https://github.com/andersio","followers_url":"https://api.github.com/users/andersio/followers","following_url":"https://api.github.com/users/andersio/following{/other_user}","gists_url":"https://api.github.com/users/andersio/gists{/gist_id}","starred_url":"https://api.github.com/users/andersio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersio/subscriptions","organizations_url":"https://api.github.com/users/andersio/orgs","repos_url":"https://api.github.com/users/andersio/repos","events_url":"https://api.github.com/users/andersio/events{/privacy}","received_events_url":"https://api.github.com/users/andersio/received_events","type":"User","site_admin":false},"repo":{"id":47269531,"name":"ReactiveCocoa","full_name":"andersio/ReactiveCocoa","owner":{"login":"andersio","id":11806295,"avatar_url":"https://avatars.githubusercontent.com/u/11806295?v=3","gravatar_id":"","url":"https://api.github.com/users/andersio","html_url":"https://github.com/andersio","followers_url":"https://api.github.com/users/andersio/followers","following_url":"https://api.github.com/users/andersio/following{/other_user}","gists_url":"https://api.github.com/users/andersio/gists{/gist_id}","starred_url":"https://api.github.com/users/andersio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersio/subscriptions","organizations_url":"https://api.github.com/users/andersio/orgs","repos_url":"https://api.github.com/users/andersio/repos","events_url":"https://api.github.com/users/andersio/events{/privacy}","received_events_url":"https://api.github.com/users/andersio/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andersio/ReactiveCocoa","description":"Streams of values over time","fork":true,"url":"https://api.github.com/repos/andersio/ReactiveCocoa","forks_url":"https://api.github.com/repos/andersio/ReactiveCocoa/forks","keys_url":"https://api.github.com/repos/andersio/ReactiveCocoa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andersio/ReactiveCocoa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andersio/ReactiveCocoa/teams","hooks_url":"https://api.github.com/repos/andersio/ReactiveCocoa/hooks","issue_events_url":"https://api.github.com/repos/andersio/ReactiveCocoa/issues/events{/number}","events_url":"https://api.github.com/repos/andersio/ReactiveCocoa/events","assignees_url":"https://api.github.com/repos/andersio/ReactiveCocoa/assignees{/user}","branches_url":"https://api.github.com/repos/andersio/ReactiveCocoa/branches{/branch}","tags_url":"https://api.github.com/repos/andersio/ReactiveCocoa/tags","blobs_url":"https://api.github.com/repos/andersio/ReactiveCocoa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andersio/ReactiveCocoa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andersio/ReactiveCocoa/git/refs{/sha}","trees_url":"https://api.github.com/repos/andersio/ReactiveCocoa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andersio/ReactiveCocoa/statuses/{sha}","languages_url":"https://api.github.com/repos/andersio/ReactiveCocoa/languages","stargazers_url":"https://api.github.com/repos/andersio/ReactiveCocoa/stargazers","contributors_url":"https://api.github.com/repos/andersio/ReactiveCocoa/contributors","subscribers_url":"https://api.github.com/repos/andersio/ReactiveCocoa/subscribers","subscription_url":"https://api.github.com/repos/andersio/ReactiveCocoa/subscription","commits_url":"https://api.github.com/repos/andersio/ReactiveCocoa/commits{/sha}","git_commits_url":"https://api.github.com/repos/andersio/ReactiveCocoa/git/commits{/sha}","comments_url":"https://api.github.com/repos/andersio/ReactiveCocoa/comments{/number}","issue_comment_url":"https://api.github.com/repos/andersio/ReactiveCocoa/issues/comments{/number}","contents_url":"https://api.github.com/repos/andersio/ReactiveCocoa/contents/{+path}","compare_url":"https://api.github.com/repos/andersio/ReactiveCocoa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andersio/ReactiveCocoa/merges","archive_url":"https://api.github.com/repos/andersio/ReactiveCocoa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andersio/ReactiveCocoa/downloads","issues_url":"https://api.github.com/repos/andersio/ReactiveCocoa/issues{/number}","pulls_url":"https://api.github.com/repos/andersio/ReactiveCocoa/pulls{/number}","milestones_url":"https://api.github.com/repos/andersio/ReactiveCocoa/milestones{/number}","notifications_url":"https://api.github.com/repos/andersio/ReactiveCocoa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andersio/ReactiveCocoa/labels{/name}","releases_url":"https://api.github.com/repos/andersio/ReactiveCocoa/releases{/id}","deployments_url":"https://api.github.com/repos/andersio/ReactiveCocoa/deployments","created_at":"2015-12-02T15:21:14Z","updated_at":"2016-03-21T15:44:00Z","pushed_at":"2016-05-22T10:15:48Z","git_url":"git://github.com/andersio/ReactiveCocoa.git","ssh_url":"git@github.com:andersio/ReactiveCocoa.git","clone_url":"https://github.com/andersio/ReactiveCocoa.git","svn_url":"https://github.com/andersio/ReactiveCocoa","homepage":"","size":16131,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ReactiveCocoa:master","ref":"master","sha":"ead8bb756a686a9505b32199ac03d5655e38697b","user":{"login":"ReactiveCocoa","id":3422977,"avatar_url":"https://avatars.githubusercontent.com/u/3422977?v=3","gravatar_id":"","url":"https://api.github.com/users/ReactiveCocoa","html_url":"https://github.com/ReactiveCocoa","followers_url":"https://api.github.com/users/ReactiveCocoa/followers","following_url":"https://api.github.com/users/ReactiveCocoa/following{/other_user}","gists_url":"https://api.github.com/users/ReactiveCocoa/gists{/gist_id}","starred_url":"https://api.github.com/users/ReactiveCocoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReactiveCocoa/subscriptions","organizations_url":"https://api.github.com/users/ReactiveCocoa/orgs","repos_url":"https://api.github.com/users/ReactiveCocoa/repos","events_url":"https://api.github.com/users/ReactiveCocoa/events{/privacy}","received_events_url":"https://api.github.com/users/ReactiveCocoa/received_events","type":"Organization","site_admin":false},"repo":{"id":3606624,"name":"ReactiveCocoa","full_name":"ReactiveCocoa/ReactiveCocoa","owner":{"login":"ReactiveCocoa","id":3422977,"avatar_url":"https://avatars.githubusercontent.com/u/3422977?v=3","gravatar_id":"","url":"https://api.github.com/users/ReactiveCocoa","html_url":"https://github.com/ReactiveCocoa","followers_url":"https://api.github.com/users/ReactiveCocoa/followers","following_url":"https://api.github.com/users/ReactiveCocoa/following{/other_user}","gists_url":"https://api.github.com/users/ReactiveCocoa/gists{/gist_id}","starred_url":"https://api.github.com/users/ReactiveCocoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReactiveCocoa/subscriptions","organizations_url":"https://api.github.com/users/ReactiveCocoa/orgs","repos_url":"https://api.github.com/users/ReactiveCocoa/repos","events_url":"https://api.github.com/users/ReactiveCocoa/events{/privacy}","received_events_url":"https://api.github.com/users/ReactiveCocoa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ReactiveCocoa/ReactiveCocoa","description":"Streams of values over time","fork":false,"url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa","forks_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/forks","keys_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/teams","hooks_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/hooks","issue_events_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/events{/number}","events_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/events","assignees_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/assignees{/user}","branches_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/branches{/branch}","tags_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/tags","blobs_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/git/refs{/sha}","trees_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/statuses/{sha}","languages_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/languages","stargazers_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/stargazers","contributors_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/contributors","subscribers_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/subscribers","subscription_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/subscription","commits_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/commits{/sha}","git_commits_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/git/commits{/sha}","comments_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/comments{/number}","issue_comment_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/comments{/number}","contents_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/contents/{+path}","compare_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/merges","archive_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/downloads","issues_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues{/number}","pulls_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls{/number}","milestones_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/milestones{/number}","notifications_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/labels{/name}","releases_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/releases{/id}","deployments_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/deployments","created_at":"2012-03-02T22:11:24Z","updated_at":"2016-05-22T09:36:29Z","pushed_at":"2016-05-22T10:17:47Z","git_url":"git://github.com/ReactiveCocoa/ReactiveCocoa.git","ssh_url":"git@github.com:ReactiveCocoa/ReactiveCocoa.git","clone_url":"https://github.com/ReactiveCocoa/ReactiveCocoa.git","svn_url":"https://github.com/ReactiveCocoa/ReactiveCocoa","homepage":"","size":24690,"stargazers_count":13958,"watchers_count":13958,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2564,"mirror_url":null,"open_issues_count":33,"forks":2564,"open_issues":33,"watchers":13958,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/2911"},"html":{"href":"https://github.com/ReactiveCocoa/ReactiveCocoa/pull/2911"},"issue":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2911"},"comments":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2911/comments"},"review_comments":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/2911/comments"},"review_comment":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/2911/commits"},"statuses":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/statuses/a96415caea149bdb96236e06b4bbfc7d3f3c1de6"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":7,"review_comments":9,"commits":13,"additions":1201,"deletions":231,"changed_files":5}}
{"actor":{"display_login":"andersio"}}