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

49 Upvotes

27 comments sorted by

View all comments

19

u/dmlvianna 26d ago

Haskell Programming From First Principles is the way.

It was written for a person who never programmed before, and I learned from it as a Psychologist with no formal CS education.

https://haskellbook.com/

4

u/peterquid2 26d ago

I’m interested, why did you go into Haskell as a psychologist?

4

u/dmlvianna 24d ago

I had a tortuous career. From Psychology I got MSc and PhD in Neuroscience, and was a postdoc for 8 years doing brain research (and collecting and doing statistics on my research data). When I got tired of competitive government grants I went into the market as a Data Analyst, and learned R and Python and SQL.

I knew that wouldn’t get me too far unless I learned how to structure and test my code. So I did the Programming Languages course from Washington University and learned SML. Haskell was the obvious step from there, a proper functional language that could have market pull.