@djspiewak ie. we could similarly say that impurity is part of Try's contract.
2012-08-29 09:16:06@marius We can say that impurity is part of Try's contract, at which point it basically becomes an incarnation of the IO monad.
2012-08-29 09:17:13@marius The weird bit is that Try is an incarnation of the IO monad where the failure state is eagerly testable, which is a bit…odd
2012-08-29 09:17:49@mergeconflict btw, would *love* to see something (perhaps a blog post from you!) explaining Validation and how it differs from Try.
2012-08-29 09:18:37@marius Not gonna blog, just say it differs mainly in that it doesn't handle "raw" exceptions. All it has for that is: https://t.co/lx5CV0vx
2012-08-29 09:26:59@mergeconflict Got it. Yes, so it's basically just a specialized Either, then.
2012-08-29 09:28:38@marius Yup. Another important difference is that it accumulates errors when possible (i.e. when used as Applicative): https://t.co/1vLkQygJ
2012-08-29 09:30:20try/catch around a block with a lazy val that can throw shall not avail you. #scala
2012-08-29 09:41:43@djspiewak @rolandkuhn @marius I don't see the issue if you remove catching functions from "counting" in your category like side effecting
2012-08-29 09:50:29@jsuereth @rolandkuhn @marius Catching functions are not referentially transparent as they cannot be beta reduced.
2012-08-29 10:11:11@djspiewak @rolandkuhn @marius Right, so our category is now just functions that catch? I'm looking at monad laws now.
2012-08-29 10:13:26Hey #scalaz faction, stop trolling the #scala community with your fancy maths and laws.
2012-08-29 10:20:31@dibblego @djspiewak @marius Ok, so the Monad law is violated if you allow throwing functions into your category.
2012-08-29 10:52:45@dibblego @djspiewak @marius specifically left identity: f(x) == Try(x) flatMap f
2012-08-29 10:54:02@dibblego @djspiewak @marius That's where f: A => Try[B] and x: => A
2012-08-29 10:54:22