I’ve been using Rust for a few months now, writing rather more of it than I expected—though quite a lot of that has been thrown away as I’ve learned, improved what I’m writing, and taken some more complex tasks beyond what I originally intended.
I still love it and thought it might be good to talk about some of the important keywords that come up again and again in Rust. I’ll provide my personal summary of what they do, why you need to think about how you use them, and anything else that’s useful, particularly for people who are new to Rust or coming from another language
Without further ado, let’s get going. A good place for further information is always the official Rust documentation—you’ll probably want to start with the std library.
lib.rs
file (the Rust default) into which you can put all of them with a nicely named module. I’ve had clashes of const variable names (and values!) across different files in different modules simply because I was too lazy to do anything other than cut and paste across files when I could have saved myself lots of work simply by creating a shared module.#rust #programming #developer