{"action":"created","issue":{"url":"https://api.github.com/repos/Quick/Nimble/issues/194","labels_url":"https://api.github.com/repos/Quick/Nimble/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/Quick/Nimble/issues/194/comments","events_url":"https://api.github.com/repos/Quick/Nimble/issues/194/events","html_url":"https://github.com/Quick/Nimble/pull/194","id":108070445,"number":194,"title":"Added vargs into waitUntil done","user":{"login":"nikita-leonov","id":991541,"avatar_url":"https://avatars.githubusercontent.com/u/991541?v=3","gravatar_id":"","url":"https://api.github.com/users/nikita-leonov","html_url":"https://github.com/nikita-leonov","followers_url":"https://api.github.com/users/nikita-leonov/followers","following_url":"https://api.github.com/users/nikita-leonov/following{/other_user}","gists_url":"https://api.github.com/users/nikita-leonov/gists{/gist_id}","starred_url":"https://api.github.com/users/nikita-leonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikita-leonov/subscriptions","organizations_url":"https://api.github.com/users/nikita-leonov/orgs","repos_url":"https://api.github.com/users/nikita-leonov/repos","events_url":"https://api.github.com/users/nikita-leonov/events{/privacy}","received_events_url":"https://api.github.com/users/nikita-leonov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-09-24T06:54:04Z","updated_at":"2015-10-02T15:52:21Z","closed_at":"2015-09-30T15:58:55Z","pull_request":{"url":"https://api.github.com/repos/Quick/Nimble/pulls/194","html_url":"https://github.com/Quick/Nimble/pull/194","diff_url":"https://github.com/Quick/Nimble/pull/194.diff","patch_url":"https://github.com/Quick/Nimble/pull/194.patch"},"body":"Currently done does not accept any arguments, as result sometimes it require additional boilerplate code. The current pull request solves this problem.\r\n\r\nHere is an example what we can do with current waitUntil implementation:\r\n```\r\nfunc asyncCall(callback:(Void -> Void)) { ... }\r\nfunc argsAsyncCall(callback:(AnyObject->Void)) { ... }\r\n\r\nwaitUntil { done in\r\n  asyncCall(done) //Looks nice\r\n  asyncCall { _ in done() } //Looks ugly\r\n}\r\n```\r\n\r\nProposed change allows to write code consistently since introduces variadic arguments for done function. Swift allows zero to any amount of variadic arguments. As result we always getting consistent code: \r\n```\r\nwaitUntil { done in \r\n  anyAsyncCall(done) // consistency!\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/Quick/Nimble/issues/comments/145069326","html_url":"https://github.com/Quick/Nimble/pull/194#issuecomment-145069326","issue_url":"https://api.github.com/repos/Quick/Nimble/issues/194","id":145069326,"user":{"login":"jeffh","id":68616,"avatar_url":"https://avatars.githubusercontent.com/u/68616?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffh","html_url":"https://github.com/jeffh","followers_url":"https://api.github.com/users/jeffh/followers","following_url":"https://api.github.com/users/jeffh/following{/other_user}","gists_url":"https://api.github.com/users/jeffh/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffh/subscriptions","organizations_url":"https://api.github.com/users/jeffh/orgs","repos_url":"https://api.github.com/users/jeffh/repos","events_url":"https://api.github.com/users/jeffh/events{/privacy}","received_events_url":"https://api.github.com/users/jeffh/received_events","type":"User","site_admin":false},"created_at":"2015-10-02T15:52:21Z","updated_at":"2015-10-02T15:52:21Z","body":"Oh ok. I guess I don't really understand what you previously said then. I'll have to play around with it when I get a chance\n\n\n\n\n—\nSent from my iPhone\n\nOn Thu, Oct 1, 2015 at 10:16 PM, Nikita Leonov <notifications@github.com>\nwrote:\n\n> @jeffh looks like something lost in translation :) I was talking about impossibility of `fail` implementation. Current PR with `done` that was recently merged is fine.\n> ---\n> Reply to this email directly or view it on GitHub:\n> https://github.com/Quick/Nimble/pull/194#issuecomment-144923999"}}