r/functionalprogramming • u/j_gitczak • Jan 12 '25
Question Which functional programming language should I learn?
I have recently discovered the world of functional programming and I want to learn a functional programming language.
For most of my life I have programmed in Python and I have always liked its onelined expressions like list comprehension and lambdas.
I also value good error messages in a programming language (not some segmentation fault or NullPointerException bullshit), and this is also why I like for example Rust.
I study Mathematics so I like the idea of a programming language being "mathematical" which I heard Haskell being decribed like, and Haskell is what I initially thought would be the best to learn, but I don't want to exclude other languages, so that's why I'm making this post.
I don't plan on ending my functional programming journey on one language, so I want to first learn one just for fun, so it doesn't matter if a language is used in industry or not.
I would really appreciate some recommendations for the language I should learn.
View all comments
Show parent comment
2
u/spermion Jan 13 '25
A type terrorist huh... Now I regret never giving Counterstrike a try!
I really like Lean 4 for its polish. And I'd assume its tactics are among the best developed.
I wanted to try HoTT as a way to understand homotopy theory using my intuitions from programming, not the other way round. (Turns out a homotopy theory point of view is very useful for some topics in theoretical physics.) And that worked nicely for basic notions like fibrations. But I didn't make it through the π1(S¹) = Z tutorial, there were so many little intermediate steps to prove such an intuitive thing.
So HoTT wasn't the "understand complex math using simple code" experience I hoped for. The ideas are extremely pretty, but the arguments seem to get shockingly complicated very quickly (why??).
To be fair much of it felt like boilerplate that you'd quickly get used to and perhaps automate away. Like to prove true ≠ false you had to construct some auxiliary fibration and transport something around it...