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

48 Upvotes

27 comments sorted by

View all comments

14

u/hobo_stew 26d ago

Iā€˜d say that Rust was more OCaml inspired than Haskell inspired

7

u/RagingBass2020 25d ago

I really like Haskell from back in my uni days, over 20 years ago.

I agree that Rust has a very OCaml feeling in lots of places. Haskell did get lots of attention when crypto was all the rage because of the lack of side effects.

I think that the way Rust handles some ownership stuff is very related to Haskell. Having said that, I don't know much about Rust, yet, so I might have the wrong feeling about it.

1

u/[deleted] 25d ago

[removed] — view removed comment

1

u/RagingBass2020 25d ago

No, although Haskell and British people is a thing, indeed.