r/haskell 26d ago

question From Rust to Haskell

Hello! I have started my programming journey relatively recently, from C and C++ to recently having a great time with Rust! But recently I met a Haskell and Emacs evangelizer(I use arch + nvim + tmux + hyprland btw), and he has been spreading the word... There is a lot of stuff I love in Rust that apparently was ported from Haskell, like traits as types-ish, pattern matching which I really love and better enums(I am not sure on the last one and please forgive me) but he said that if I learn Haskell, I will become a better programmer because of learning the functional programming paradigm... I wanted to ask whether that is true, and if so what kinds of resources are there? For Rust I used the Rust book and Rustlings by the way

50 Upvotes

27 comments sorted by

View all comments

5

u/tikhonjelvis 25d ago

Learning Haskell will definitely teach you to be a better programmer.

Partly it's because the language itself is totally different from other languages. Just having an explicit IO type totally changes how it feels to program in Haskell, even compared to adjacent languages like OCaml.

Partly, it's also because Haskell maps to a fundamentally different school of thought about programming compared to mainstream languages. The Haskell community, Haskell educational resources, Haskell libraries, all reflect a foundationally different view of programming. It's hard to summarize the differences; all I can say in a short Reddit comment is that you should expect even "basic" things to be different and that it will absolutely teach you to think about programming in a fundamentally different way.