
I’ve been approached by a couple of people on whether it’s sensible to dive into rust, and what strategy they should pursue to learn the language. The FAQ below is based on my impression after a couple of months, and I’m sure it’ll be subject to change as that journey continues
Q: As a Python dev/data scientist/MLE, should I invest the time to learn rust?
According to the SO survey 2023:
Rust is the most admired language, more than 80% of developers that use it want to use it again next year. Compare this to the least admired language: MATLAB. Less than 20% of developers who used this language want to use it again next year.
I remember starting to work in scientific software development ca. 2012, and I cannot be thankful enough to my supervisor back then to choose Python over C++ or Matlab (which would have been highly viable back then). Today might be an excellent time to get started with a language that might play a major role in SW in the next decade.
I’d also recommend to learn rust for the following reasons:
- It’s got a steep learning curve, but is great for larger and complex projects. The tool set to learn the language is absolutely amazing, and no other language comes anywhere close (see more below)
- It integrates nicely with Python, and can be particularly useful to complement it for embedded system, cli tool, backend development etc.
- The ecosystem is already impressive, and will surely continue to grow
- It exposes you to new ideas and approaches, which is always valuable
Q: Is rust object oriented or functional?
I disagree with the premise that a language should be oo or functional, and most languages don’t follow that paradigm (which a couple of very insightful exceptions). Rust encompasses elements from both styles, so you can choose your style appropriately depending your problem and depending on your previous experience.
Q: How would I learn rust?
Rust has an amazing triplet of resources that helps you to quickly get started: The book, the rustlings course, and rust by example.
I’d recommend to quickly go over rust by example to familiarize yourself with the basic ideas and syntax without trying to understand everything, and without any coding. This should take O(1h), and helps to put things into perspective for step 2.
Next, I’d go ahead and do the rustlings course, which I dare say is the best resource I’ve ever seen to teach a new language. Parallel to the course, I found it insightful to take a deep-dive into the book and read the chapter matching the current section in the rustlings course.
There’s a great video by Tris Oaten on “How to learn rust”, which is also fun to view (and comes to a very similar conclusion).
So there you have it, go try it out and build great things!