{"action":"created","comment":{"url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/comments/38824871","id":38824871,"diff_hunk":"@@ -92,13 +92,18 @@ public func toRACSignal<T: AnyObject, E>(producer: SignalProducer<T, E>) -> RACS\n /// Any `Interrupted` events will be silently discarded.\n public func toRACSignal<T: AnyObject, E>(producer: SignalProducer<T?, E>) -> RACSignal {\n \treturn RACSignal.createSignal { subscriber in\n-\t\tlet selfDisposable = producer.start(next: { value in\n-\t\t\tsubscriber.sendNext(value)\n-\t\t}, error: { error in\n-\t\t\tsubscriber.sendError(error as NSError)\n-\t\t}, completed: {\n-\t\t\tsubscriber.sendCompleted()\n-\t\t})\n+\t\tlet selfDisposable = producer.start { event in\n+\t\t\tswitch event {\n+\t\t\tcase .Next(let value):","path":"ReactiveCocoa/Swift/ObjectiveCBridging.swift","position":13,"original_position":13,"commit_id":"75c265419d105550f4bdb80a36b74ce5da2148a6","original_commit_id":"75c265419d105550f4bdb80a36b74ce5da2148a6","user":{"login":"neilpa","id":42419,"avatar_url":"https://avatars.githubusercontent.com/u/42419?v=3","gravatar_id":"","url":"https://api.github.com/users/neilpa","html_url":"https://github.com/neilpa","followers_url":"https://api.github.com/users/neilpa/followers","following_url":"https://api.github.com/users/neilpa/following{/other_user}","gists_url":"https://api.github.com/users/neilpa/gists{/gist_id}","starred_url":"https://api.github.com/users/neilpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neilpa/subscriptions","organizations_url":"https://api.github.com/users/neilpa/orgs","repos_url":"https://api.github.com/users/neilpa/repos","events_url":"https://api.github.com/users/neilpa/events{/privacy}","received_events_url":"https://api.github.com/users/neilpa/received_events","type":"User","site_admin":false},"body":"I _think_ most of the RAC code does `case let .Next(value):` instead of moving the `let` inside the case name.","created_at":"2015-09-06T19:03:04Z","updated_at":"2015-09-06T19:03:04Z","html_url":"https://github.com/ReactiveCocoa/ReactiveCocoa/pull/2318#discussion_r38824871","pull_request_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/2318","_links":{"self":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/comments/38824871"},"html":{"href":"https://github.com/ReactiveCocoa/ReactiveCocoa/pull/2318#discussion_r38824871"},"pull_request":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/2318"}}},"pull_request":{"url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/2318","id":44305443,"html_url":"https://github.com/ReactiveCocoa/ReactiveCocoa/pull/2318","diff_url":"https://github.com/ReactiveCocoa/ReactiveCocoa/pull/2318.diff","patch_url":"https://github.com/ReactiveCocoa/ReactiveCocoa/pull/2318.patch","issue_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2318","number":2318,"state":"open","locked":false,"title":"Replace start/observe closure syntax with distinct functions","user":{"login":"sebreh","id":328169,"avatar_url":"https://avatars.githubusercontent.com/u/328169?v=3","gravatar_id":"","url":"https://api.github.com/users/sebreh","html_url":"https://github.com/sebreh","followers_url":"https://api.github.com/users/sebreh/followers","following_url":"https://api.github.com/users/sebreh/following{/other_user}","gists_url":"https://api.github.com/users/sebreh/gists{/gist_id}","starred_url":"https://api.github.com/users/sebreh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebreh/subscriptions","organizations_url":"https://api.github.com/users/sebreh/orgs","repos_url":"https://api.github.com/users/sebreh/repos","events_url":"https://api.github.com/users/sebreh/events{/privacy}","received_events_url":"https://api.github.com/users/sebreh/received_events","type":"User","site_admin":false},"body":"Issues #2311 contains the background discussion for this change.\r\n\r\nIn Swift 2 (and the swift2 branch of this repo), the `SinkOf<T>` type is gone and instead a normal closure `T -> ()` is used. This is great but it introduces a potential risk due to the behaviour change when calling `SignalProducer.start()` with a trailing closure. In Swift 1.x, the trailing closure would default to the next argument, and in order to provide a sink you would need to pass in a `SinkOf<Event<T>>`. In Swift 2 however, the trailing closure will match the new sink type `T -> ()`. From the call site, the call looks identical after migrating to the swift2 branch but the behaviour is different. This could potentially introduce issues in cases where the argument to start is ignored `(_)`, as the type checker will not catch it and the closure will be called on next/interrupted/error/completed and not just on next.\r\n\r\nSince Box is no longer needed with Swift 2, this PR replaces the `start(next:_:completed:_:error:_:interrupted)` syntax with only one `start` and `observe` that takes a sink when handling multiple cases, as well as separate functions `startNext()`, `startCompleted()`, `startError()`, `startInterrupted()` for handling a single case.","created_at":"2015-09-06T16:23:20Z","updated_at":"2015-09-06T19:03:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0716b453746453e763d2d5a21e2c58034cfe33c9","assignee":null,"milestone":{"url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/milestones/5","html_url":"https://github.com/ReactiveCocoa/ReactiveCocoa/milestones/Swift%202","labels_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/milestones/5/labels","id":1167095,"number":5,"title":"Swift 2","description":"","creator":{"login":"neilpa","id":42419,"avatar_url":"https://avatars.githubusercontent.com/u/42419?v=3","gravatar_id":"","url":"https://api.github.com/users/neilpa","html_url":"https://github.com/neilpa","followers_url":"https://api.github.com/users/neilpa/followers","following_url":"https://api.github.com/users/neilpa/following{/other_user}","gists_url":"https://api.github.com/users/neilpa/gists{/gist_id}","starred_url":"https://api.github.com/users/neilpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neilpa/subscriptions","organizations_url":"https://api.github.com/users/neilpa/orgs","repos_url":"https://api.github.com/users/neilpa/repos","events_url":"https://api.github.com/users/neilpa/events{/privacy}","received_events_url":"https://api.github.com/users/neilpa/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":18,"state":"open","created_at":"2015-06-16T16:34:39Z","updated_at":"2015-09-06T18:12:59Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/2318/commits","review_comments_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/2318/comments","review_comment_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2318/comments","statuses_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/statuses/75c265419d105550f4bdb80a36b74ce5da2148a6","head":{"label":"sebreh:swift2","ref":"swift2","sha":"75c265419d105550f4bdb80a36b74ce5da2148a6","user":{"login":"sebreh","id":328169,"avatar_url":"https://avatars.githubusercontent.com/u/328169?v=3","gravatar_id":"","url":"https://api.github.com/users/sebreh","html_url":"https://github.com/sebreh","followers_url":"https://api.github.com/users/sebreh/followers","following_url":"https://api.github.com/users/sebreh/following{/other_user}","gists_url":"https://api.github.com/users/sebreh/gists{/gist_id}","starred_url":"https://api.github.com/users/sebreh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebreh/subscriptions","organizations_url":"https://api.github.com/users/sebreh/orgs","repos_url":"https://api.github.com/users/sebreh/repos","events_url":"https://api.github.com/users/sebreh/events{/privacy}","received_events_url":"https://api.github.com/users/sebreh/received_events","type":"User","site_admin":false},"repo":{"id":41847745,"name":"ReactiveCocoa","full_name":"sebreh/ReactiveCocoa","owner":{"login":"sebreh","id":328169,"avatar_url":"https://avatars.githubusercontent.com/u/328169?v=3","gravatar_id":"","url":"https://api.github.com/users/sebreh","html_url":"https://github.com/sebreh","followers_url":"https://api.github.com/users/sebreh/followers","following_url":"https://api.github.com/users/sebreh/following{/other_user}","gists_url":"https://api.github.com/users/sebreh/gists{/gist_id}","starred_url":"https://api.github.com/users/sebreh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebreh/subscriptions","organizations_url":"https://api.github.com/users/sebreh/orgs","repos_url":"https://api.github.com/users/sebreh/repos","events_url":"https://api.github.com/users/sebreh/events{/privacy}","received_events_url":"https://api.github.com/users/sebreh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sebreh/ReactiveCocoa","description":"Streams of values over time","fork":true,"url":"https://api.github.com/repos/sebreh/ReactiveCocoa","forks_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/forks","keys_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/teams","hooks_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/hooks","issue_events_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/issues/events{/number}","events_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/events","assignees_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/assignees{/user}","branches_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/branches{/branch}","tags_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/tags","blobs_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/git/refs{/sha}","trees_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/statuses/{sha}","languages_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/languages","stargazers_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/stargazers","contributors_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/contributors","subscribers_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/subscribers","subscription_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/subscription","commits_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/commits{/sha}","git_commits_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/git/commits{/sha}","comments_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/comments{/number}","issue_comment_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/issues/comments{/number}","contents_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/contents/{+path}","compare_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/merges","archive_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/downloads","issues_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/issues{/number}","pulls_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/pulls{/number}","milestones_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/milestones{/number}","notifications_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/labels{/name}","releases_url":"https://api.github.com/repos/sebreh/ReactiveCocoa/releases{/id}","created_at":"2015-09-03T07:41:08Z","updated_at":"2015-09-03T07:41:12Z","pushed_at":"2015-09-06T15:57:31Z","git_url":"git://github.com/sebreh/ReactiveCocoa.git","ssh_url":"git@github.com:sebreh/ReactiveCocoa.git","clone_url":"https://github.com/sebreh/ReactiveCocoa.git","svn_url":"https://github.com/sebreh/ReactiveCocoa","homepage":"","size":28139,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ReactiveCocoa:swift2","ref":"swift2","sha":"5e75726bf232b76b17169b3d9c9c64d1fd6bffbe","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}","created_at":"2012-03-02T22:11:24Z","updated_at":"2015-09-06T14:31:23Z","pushed_at":"2015-09-06T16:23:20Z","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":28139,"stargazers_count":9966,"watchers_count":9966,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1638,"mirror_url":null,"open_issues_count":155,"forks":1638,"open_issues":155,"watchers":9966,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/2318"},"html":{"href":"https://github.com/ReactiveCocoa/ReactiveCocoa/pull/2318"},"issue":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2318"},"comments":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2318/comments"},"review_comments":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/2318/comments"},"review_comment":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/pulls/2318/commits"},"statuses":{"href":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/statuses/75c265419d105550f4bdb80a36b74ce5da2148a6"}}}}