{"action":"created","issue":{"url":"https://api.github.com/repos/typelevel/cats/issues/1059","repository_url":"https://api.github.com/repos/typelevel/cats","labels_url":"https://api.github.com/repos/typelevel/cats/issues/1059/labels{/name}","comments_url":"https://api.github.com/repos/typelevel/cats/issues/1059/comments","events_url":"https://api.github.com/repos/typelevel/cats/issues/1059/events","html_url":"https://github.com/typelevel/cats/pull/1059","id":156401039,"number":1059,"title":"Add Try instances","user":{"login":"johnynek","id":67958,"avatar_url":"https://avatars.githubusercontent.com/u/67958?v=3","gravatar_id":"","url":"https://api.github.com/users/johnynek","html_url":"https://github.com/johnynek","followers_url":"https://api.github.com/users/johnynek/followers","following_url":"https://api.github.com/users/johnynek/following{/other_user}","gists_url":"https://api.github.com/users/johnynek/gists{/gist_id}","starred_url":"https://api.github.com/users/johnynek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnynek/subscriptions","organizations_url":"https://api.github.com/users/johnynek/orgs","repos_url":"https://api.github.com/users/johnynek/repos","events_url":"https://api.github.com/users/johnynek/events{/privacy}","received_events_url":"https://api.github.com/users/johnynek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2016-05-24T01:26:46Z","updated_at":"2016-05-24T17:20:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/typelevel/cats/pulls/1059","html_url":"https://github.com/typelevel/cats/pull/1059","diff_url":"https://github.com/typelevel/cats/pull/1059.diff","patch_url":"https://github.com/typelevel/cats/pull/1059.patch"},"body":"suggested a colleague try `sequence` to convert `List[Try[T]] => Try[List[T]]` without doing `Try(l.map(_.get))` but then didn't see instances for Try.\r\n\r\nThese are mostly based on `Future`, but I added `Show` and `Eq`.\r\n\r\nI made the choice that `Eq[Try[T]]` considers all `Failures` as equivalent, which seems better that getting into either taking an `Eq[Throwable]` or using universal equals, but that can be changed as needed."},"comment":{"url":"https://api.github.com/repos/typelevel/cats/issues/comments/221342599","html_url":"https://github.com/typelevel/cats/pull/1059#issuecomment-221342599","issue_url":"https://api.github.com/repos/typelevel/cats/issues/1059","id":221342599,"user":{"login":"johnynek","id":67958,"avatar_url":"https://avatars.githubusercontent.com/u/67958?v=3","gravatar_id":"","url":"https://api.github.com/users/johnynek","html_url":"https://github.com/johnynek","followers_url":"https://api.github.com/users/johnynek/followers","following_url":"https://api.github.com/users/johnynek/following{/other_user}","gists_url":"https://api.github.com/users/johnynek/gists{/gist_id}","starred_url":"https://api.github.com/users/johnynek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnynek/subscriptions","organizations_url":"https://api.github.com/users/johnynek/orgs","repos_url":"https://api.github.com/users/johnynek/repos","events_url":"https://api.github.com/users/johnynek/events{/privacy}","received_events_url":"https://api.github.com/users/johnynek/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T17:20:51Z","updated_at":"2016-05-24T17:20:51Z","body":"Can anyone succinctly describe an example of something going wrong when using `Try` or `Future` as a \"monad\". I have heard the concerns about this in the past, but everything I've heard has been about the hidden `try/catch` that map and flatMap insert. However, when does that cause a user problems? Ordinarily, when we speak about laws, we are concerned with leveraging them to ensure an algorithm is correct or an optimization can be applied.\r\n\r\nIn what kinds of cases can we imagine the `try/catch` hidden in Try/Future causing such issues. They may indeed happen, and if that is the case, I tend to be sympathetic that we should have a clearer way to communicate that to users (not sure it should be in a totally separate project as that really harms discoverability and makes it harder to maintain there projects in sync).\r\n\r\nGiven that all the problems I know about are due to using `throw`, to which my answer is \"don't do that\", I am not so concerned with the law violation. The possibility of `throw` or `null` are two of the costs of doing business in scala, I would not want to put up more roadblocks to usage and adoption of cats due to issues arising from the use of what we would not consider \"best practices\"."}}
{"actor":{"display_login":"johnynek"}}