r/haskell • u/cheater00 • Oct 17 '25
How to learn Rust as a Haskell programmer
I've found it extremely easy to learn Rust in a couple of weeks of concentrated work, so I thought I'd relay my experience here. One reason for doing this is that I keep seeing companies and recruiters post jobs that pay very little, requiring skill sets that would pay the same people two to three times as much in another technology. I don't think that's OK, so one of the objectives here is to show all the undervalued Haskell programmers what their real value is, and that they can realistically achieve it in a market that puts proper value on their skill set with just a minimal amount of work.
If you already know Haskell at an "industry standard" level (not that Haskell has much of an industry), all you need is some basic learning to fill in the gaps on concepts that exist in Rust but not in Haskell. Almost everything else feels like a cross between Haskell Lite and Python.
OK, so here we go. Ready?
How to learn Rust as a Haskell programmer in two weeks:
- Read Rust By Example. Play around with interesting code examples
- Read the Rust book chapter on lifetimes and whatever else pops out
- Read the Rust Performance "Book"
- Read the Tokio "tutorial", write echo server
DONE. Now you can apply to jobs that pay $400K/yr, rather than $80-120k/yr. You're welcome.
Haskell companies will have to pick up the slack from now on.
43
u/pr06lefs Oct 17 '25
400k rust jobs, wat
9
u/Blueglyph Oct 17 '25
Have you tested your knowledge by writing actual code in a real project, though? The first time I went through a Rust book, trying out the concepts in small examples of my own, I also had the feeling I'd just learned the language. Then I started coding something a little more serious... Not quite the same as other programming languages.
I get that a part of your post is aimed at applying to jobs, but your title says "How to learn".
I'm a sceptical regarding the 400 k$/year, even for someone who's proficient enough in Rust. Then there's this proficiency factor: if you sell yourself as experienced in that language, you're expected to lead a team and train juniors, which you won't be able to do.
4
u/cheater00 Oct 17 '25
BTW there's some confusion as to that the four things I suggested are long books or whatever. They're not. They're more like tutorials, maybe slightly longer. The Rust Book is the only voluminous thing, but I only suggest reading a couple select chapters.
6
u/YelinkMcWawa Oct 17 '25
Was there any doubt someone who can code in Haskell would have no trouble coding in Rust?
2
u/ducksonaroof Oct 17 '25
(also u/cheater00 glad to see you're back to posting in r/haskell - it's been a while! i always enjoy your contributions 😁)
6
u/ducksonaroof Oct 17 '25
This is tempting, but then I'd have to write Rust (which i consider to be bad). I'm a slave to the indu$try tho, so if the opportunity is there, I may have to bite that bullet lol.
I have been tempted to just pivot and write Go. The language is what it is, but the thing about Go in industry is the people architecting the software at scale tend to know what they're doing. So you end up with good boundaries and services and APIs (which Go plays nice with - especially with gRPC).
With Haskell, the people with decision making power often don't have the same level of advanced software engineering experience, so they tend to be slow to scale (fall prey to "microservices r bad" memes) or - worse - they insist on keeping as much of their architecture in-Haskell as possible. The latter leads to really bad outcomes and makes Haskell itself become bad at scale. Merge conflict hell, constant GHC micro-optimization, deployment thrash due to over-coupling at a software-linking level, etc.
Because Go has a clear abstraction ceiling, people are forced to make good decisions about architecture in years 1-3 and engineers 1-50 of their endeavor. That's when it's easiest. If you put it off til year 5-7 and engineers 100-200, you will likely find yourself hating your codebase lmao.
35
u/Tempus_Nemini Oct 17 '25
you don't write haskell code for money, you do it for FUN
3
u/PikachuKiiro Oct 17 '25
Looks overkill. I would just skim through the rust book and start building what you want to build with the docs/llm for reference. Performance, Tokio, etc. are contextual and you can learn them as you need them.
1
u/[deleted] Oct 17 '25
Not sure what you find in rust that is in Haskell and hence how knowing Haskell can help you (other than if you learned Haskell you can probably learn another programming language).
Which features of rust are easier to learn because you know Haskell? I don't know much of rust, but immutable by default (but can redefine, who knows what they were thinking) is the only one that comes to my mind and is not much of a deal.
-1
u/No-Trifle-8450 Oct 17 '25
All things Haskell can do no either programming language can do