On Thu Nov 13 2014 at 2:04:31 PM Sean Leather <sean.leather@gmail.com> wrote:
Simple. If my code expects saturation, and the semantics change to a partial function, I get an exception and can easily fix it. If my code expects exceptions for invalid subtractions, and the exception path is replaced with a saturating operation, I'll just get incorrect values, which are much more difficult to track down.
I think it's important to get the semantics right from the beginning when there's no cost to changing them, so it's worth spending some time discussing the pros and cons here.
That is an option, but it's one that seems rarely taken in Haskell. I think most people would expect alternate semantics via newtypes.
It doesn't particularly matter to me how this is resolved, but I do find it slightly odd that so many people seem to be arguing for a partial function as the default in this case.