notes on basic rust

I actually talked to one of the authors of the official Rust book and he was pretty nice. That being said, I found the book hard to get through. If I knew anyone trying to learn Rust, I would recommend Easy Rust to them instead.

I've seen a lot of articles or posts like the one I'm about to begin - code snippets of Rust with notes in the comments. What I didn't understand before is that you don't learn Rust by reading someone else's notes, but by writing your own.

Until now, I didn't understand how to put variables in the middle of a string. This frustrated me so much when I was working on Mind Garden.

In C, you need to manually allocate memory on the heap with malloc and free. If you forget to call free on memory you previously allocated with malloc, you get a memory leak and the memory will remain allocated until the program stops running. Memory leaks are easy to cause in C and pretty difficult to stumble upon in Rust.