As much as people like to call Haskell’s type system “advanced”, it’s not that advanced compared to Kotlin, Scala and recent C# versions, even Java, we’re talking about the same ballpark.
I’d like to hear where Haskell has an upper hand for catching type errors relative to these, I don’t think it does honestly, but I’ve only used Haskell in personal projects, not professionally as I have those other languages.
Haskell can use complex types which allows you to type things you couldn’t in others (well except Scala, that type system is just as nuts as Haskell’s). But those advancement from my understanding doesn’t actually make it that you can statically check more type errors.
Anyways, I say that because I’ve had considerable experience writing production large scale programs with all those other ones (Scala, Kotlin, C# and Java), as I have with Clojure and I don’t have more bugs in my Clojure code, actually I often have less “critical” bug and logical bugs for the reason Sean mentioned. There’s the very rare, like once a year, runtime bug due to a type error in edge cases I didn’t catch during development, but those are the easiest to fix (they fail immediately, so rollback, fix, redeploy, takes an oncall 30min).
Haskell I’ve used only personally on small side projects, so I can’t really speak to bug amounts, since I didn’t really do a lot of QA or tracking of issues as projects were mostly toy. But what I understand of type systems, I don’t think it would do you better than Kotlin or Scala for example.
Also like Sean pointed out, I was really interested with trying to find empirical evidence for defect rates of various languages a while back, and surprisingly all research I found (but keep in mind there isn’t a lot of high quality one on that topic) found that Clojure and Haskell exhibit similar defect rates, both ranking towards the lowest defect of any language. So you’re in good hands either way. That said, similarly studies found dynamic languages like Clojure to produce better productivity.
That makes Clojure both ranking in the top for low defect and for high productivity.
And my personal annectode building large scale production systems with Clojure for the last 3 years confirms this as well.
Take it all with a grain of salt though, my research conclude with the fact that language choice actually has some of the least impact on both productivity and defects, like a 1-5% variance, so in the end, it doesn’t matter, what matters is which language you personally find the most interesting, fun, and which you are most enjoying yourself coding in as well as being productive in, and for me that’s Clojure hands down, but if that’s Haskell for you go with it!
Regards