I think these concepts translate to other languages fairly well, and are easy to learn in Haskell:
- Newtypes (Languages like Kotlin/Swift have support for them, and you can kinda get close with lots of classes in Java)
- Purity (can write “pure” code in most languages)
- Algebraic Data Types (help with thinking about modeling data, works in eg TypeScript)
- Maybe / Optional types (Now very popular in other languages)
- Parser Combinators (work in eg JavaScript)
However, I think there are still some extremely interesting ideas that can only be implemented in Haskell and some related languages (e.g. Joy) which may prove very useful.
One can see the glimpse of that in Compiling to Categories [1]. In general, programming in a point-free way may lead to lots of advantages we don't understand well yet [2-3]. I think, for example, synthesizing point-free programs should be a cool path towards AI.
[1] http://conal.net/papers/compiling-to-categories/
Also, since Haskell has a lot of advanced type system features, whatever feature that gains traction in other languages (traits in Rust and Swift, optional chaining, async/await) I find much easier to learn as they are usually specializations of more general concepts in Haskell.
And as someone who also studies mathematics, the connections between functional programming and areas like logic, order theory and category theory run deep—programs can too become objects of mathematical study, with their correctness proved and refactoring sound.
[0] with exceptionally rare caveats
Writing good Haskell always seemed harder to me than something like Python. The amount I'd have to think before beginning to type was a lot, but it always seemed worth it, as there was always potential always for a beautiful solution to any problem.
As a result, before I write code in any production language I give a little more thought to what I'm about to write, which I think ends up with a better result.
Heck, even if Haskell just gave a developer an appreciation for basic functional programming, that would be something that will benefit them for years in my view.
Never used it in production either but I did use Haskell to ace some of my advanced computer science course work with less time and less lines of code than my peers.
In short, it's a way to restrict the data types to such a degree that the type checker can do compile-time checks of array sizes and other interesting things, as those aspects are directly expressed as distinct types depending on each other. The principle requires a pretty powerful type system and is cumbersome to use, but I found it fascinating regardless.
I had mainly used Scott Wlaschin's site F# for Fun and Profit, and MS sites, for F#.
Edit: Also had looked at OCaml, via Real World OCaml, and also much earlier, via INRIA / O'Reilly sites / books / software.
F# may be based on OCaml.
Both resources are free to read online.
https://gitlab.haskell.org/ghc/ghc/-/wikis/dependent-haskell
In addition to expanding my thinking and making be a better developer in other languages, I think Haskell has made me expect more of programming languages. In a positive way. Things can be better than they are. That doesn't mean things should be Haskell. But they can be better.
I'm still not OK with monads though :-)
I’ve used Haskell in production (not a very big service but anyway) and while I enjoyed it, I think that it was at the cost of my employer. Spending my time studying about lambda calculus and suffering through slow compile times of GHC isn’t a very rewarding experience (for me personally). IMO I’m still a better programmer for knowing the concepts of, but not by much. It’s a field bigger than Haskell and IMO writing production Haskell code only skims the surface of lambda calculus/theory.
... aren't those very basic things that are taught in the first years of any comp. sci. university ?