I've loved Haskell for decades, but not yet had a chance to use it to pay bills. IMO, Haskell, more than any of the 1e3+ other PLs I know, shines in enabling 1) elegant and 2) robust ("better bugs") solutions.
Elegance comes from the non-strict functional part, enabling succent and modular implementations.
Robustness comes from the static typing which forces you to be explicit about the range and domain of functions.
What's unique about Haskell is that the type system is _very_ expressive, making this a practical approach. IMO, the type system is absolutely key to Haskell.
Where Haskell disappoints: Int. For reasons that I still cannot phantom, someone chose to infest a beautiful language that is almost free of pitfalls with the atrocity of a "C-like" Int type. Indeed, in Haskell, this isn't always true:
a < a + 1 where a :: Int
which is a real shame IMO. It fails the largest value of Int (which BTW is implementation dependent). The correct answer would either to have (my preference) Int == Integer, that is arbitrary sized integers always, or at the _very_ least, have (+) fail on overflow, that is, return bottom like head [].
Elegance comes from the non-strict functional part, enabling succent and modular implementations.
Robustness comes from the static typing which forces you to be explicit about the range and domain of functions.
What's unique about Haskell is that the type system is _very_ expressive, making this a practical approach. IMO, the type system is absolutely key to Haskell.
Where Haskell disappoints: Int. For reasons that I still cannot phantom, someone chose to infest a beautiful language that is almost free of pitfalls with the atrocity of a "C-like" Int type. Indeed, in Haskell, this isn't always true:
which is a real shame IMO. It fails the largest value of Int (which BTW is implementation dependent). The correct answer would either to have (my preference) Int == Integer, that is arbitrary sized integers always, or at the _very_ least, have (+) fail on overflow, that is, return bottom like head [].