2 ms·
You profit from learning Haskell in a way other than "I get to use Haskell to build cool things". Rather, it changes how you think about programming in other l
by nostrademons 12y ago
You profit from learning Haskell in a way other than "I get to use Haskell to build cool things". Rather, it changes how you think about programming in other languages. If you work in Java, you'll find that you'll create a lot more immutable objects after learning Haskell, and you'll understand Java 8 streams a lot better. If you work in C++, you'll grok concepts, traits, and the STL a lot better after working with typiclasses. If you work in Go, you'll grok interfaces and use them extensively. If you work in Python, you'll depend much more heavily on list comprehensions and inner functions than on mutating objects. In most statically-typed languages, you start using Optional<T> instead of nulls, or at least a NullObject pattern. You also learn how to use the type system to tag values and prevent misuse, whereas before you might've just used Strings everywhere. This is particularly handy in C++, where the overhead of defining a new type around a single primitive is zero.
I've found that helpful even though I never got to write Haskell for money and rarely write it at all now, it's changed how I program in a way that takes out a lot of the constructs that previously caused a lot of bugs & handwringing. A lot of the benefits of Haskell, you can achieve in other languages through disciplined programming.