
28 Oct
2014
28 Oct
'14
11:55 p.m.
+1 to having separate methods for Show-like and human-friendly displaying of exceptions.
Yes, I agree. I've done a quick comparison on how Ruby/Python/Java convert exceptions to strings: https://github.com/sol/exceptions-by-language Note that in Ruby/Python there is a distinction between "getting a representation of a value" (inspect/repr) and "converting a value into a string" (to_s/str). In Haskell we only have show, which is akin to inspect/repr. All of them still use a different formatting in the default handler, so it may make still sense to make the full exception type accessible. But that could be a different discussion. Cheers, Simon