{"action":"created","issue":{"url":"https://api.github.com/repos/softprops/retry/issues/12","labels_url":"https://api.github.com/repos/softprops/retry/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/softprops/retry/issues/12/comments","events_url":"https://api.github.com/repos/softprops/retry/issues/12/events","html_url":"https://github.com/softprops/retry/pull/12","id":66256033,"number":12,"title":"Allow invoking retries with less punctuation boilerplate.","user":{"login":"drob","id":1632141,"avatar_url":"https://avatars.githubusercontent.com/u/1632141?v=3","gravatar_id":"","url":"https://api.github.com/users/drob","html_url":"https://github.com/drob","followers_url":"https://api.github.com/users/drob/followers","following_url":"https://api.github.com/users/drob/following{/other_user}","gists_url":"https://api.github.com/users/drob/gists{/gist_id}","starred_url":"https://api.github.com/users/drob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drob/subscriptions","organizations_url":"https://api.github.com/users/drob/orgs","repos_url":"https://api.github.com/users/drob/repos","events_url":"https://api.github.com/users/drob/events{/privacy}","received_events_url":"https://api.github.com/users/drob/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-04T00:29:41Z","updated_at":"2015-04-06T20:36:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/softprops/retry/pulls/12","html_url":"https://github.com/softprops/retry/pull/12","diff_url":"https://github.com/softprops/retry/pull/12.diff","patch_url":"https://github.com/softprops/retry/pull/12.patch"},"body":"Given some function `attemptSomething()` that returns `Future[T]`, this allows clients to write:\r\n\r\n```\r\nretry.Directly(3) { attemptSomething() }\r\n```\r\n\r\ninstead of\r\n\r\n```\r\nretry.Directly(3) { () => {\r\n  attemptSomething()\r\n}}\r\n```\r\n\r\nIncludes one test, but compilation should get us the rest of the way there given the way the library is structured."},"comment":{"url":"https://api.github.com/repos/softprops/retry/issues/comments/90232223","html_url":"https://github.com/softprops/retry/pull/12#issuecomment-90232223","issue_url":"https://api.github.com/repos/softprops/retry/issues/12","id":90232223,"user":{"login":"drob","id":1632141,"avatar_url":"https://avatars.githubusercontent.com/u/1632141?v=3","gravatar_id":"","url":"https://api.github.com/users/drob","html_url":"https://github.com/drob","followers_url":"https://api.github.com/users/drob/followers","following_url":"https://api.github.com/users/drob/following{/other_user}","gists_url":"https://api.github.com/users/drob/gists{/gist_id}","starred_url":"https://api.github.com/users/drob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drob/subscriptions","organizations_url":"https://api.github.com/users/drob/orgs","repos_url":"https://api.github.com/users/drob/repos","events_url":"https://api.github.com/users/drob/events{/privacy}","received_events_url":"https://api.github.com/users/drob/received_events","type":"User","site_admin":false},"created_at":"2015-04-06T20:36:50Z","updated_at":"2015-04-06T20:36:50Z","body":"Removing the by-function option would be fine by me! I can't think of a case in which I'll want to use it if the by-name option exists.\r\n\r\nMight be a bit nicer to clients of this code if we did the break in two steps: one that adds the by-name signature and deprecates the by-function signature, and a second that removes the latter as an option.\r\n\r\nThis is a pretty fundamental library, and large projects that depend on it are likely to use it in many places. The two-stage break means they can migrate their code piece-by-piece instead of all-or-nothing.\r\n\r\nI'd be happy to prep those PRs for you if you want to go down this route."}}