The crab is cute
Months ago I posted on LinkedIn a picture of my first Rust
"Hello, World!" program (because is there another way to begin your learning journey with a new language??). I had heard about how it was great for multi-threading stuff, its amazing time performance, and how it had a nice mascot (I mean, Ferris is pretty cute). That sounded like C on steroids, and I was curious to try it out. So I downloaded
rustc and began my way through "the Book".
The rumours are true: Rust is awesome. I'm now working on a major (!!) Rust side project, and the more I learn about it the closer it is of becoming my favourite programming language.
Please don't tell my team (A.K.A. TypeScript) I said that.
Okay Maria focus: My goal with this post is to share a couple of my hypotheses about why everyone seems to love Rust, and a couple of features I think other languages could use as "inspiration". Or maybe these are only the reasons why I like it and this list is kind of irrelevant. But I'm going to continue anyway because if you read until here you're already committed so let's go.
rustdocsare fabulous: I like clean code, but I love well-documented code.
@tagI need to use, Markdown-based documentation is great.
rustdocsbecome units tests for your public API, and you can add test modules in each file that run with a simple
cargo testcommand. The ease of testing has made me adopt a test-driven mentality, while in the past tests felt like a painful maintenance task we told interns to fix.
It feels dangerous, in a good way: In university I really liked my C assignments. There's a masochistic pleasure in writing a program whose only error message is "Segmentation fault, core dumped". The danger of manipulating raw pointers, messing up memory, and other low-level joys can be really fun when you're used to higher-level languages. Yes, Rust errors can be really annoying to debug (lifetimes are tricky), but its primitive nature makes me feel more like a true hacker.
The editor support is great:
rust-analyzermakes the editing experience great. I always use VS Code for all my non-work coding, and the customizable language server features makes Rust development really enjoyable. Also, after implementing an LSP-based extension in Visual Studio, I love how Rust uses the language server protocol for its editor support.
The community is welcoming: When I find a bug, I always try to fix it. Even as a Rust beginner, I've already contributed to a couple of Rust projects (from fixing documentation to adding new features). All the code maintainers I've interacted with have been really nice and welcoming, not making me feel like an annoying newbie that disturbs their codebase.
Sooo many learning resources: From the Rust book to practice exercises, there are a lot of (free!) resources to learn Rust. No need to take a fancy boot camp to learn the obscure features of the language, just visit their website and pick your learning path.
...that's all I could come up with. If you're curious about learning Rust I really recommend you try it out, and if you're not then well, I hope you find joy in WinForms or something.