Every now and then I’m trying to learn Rust. For some reason it hasn’t clicked with me yet though but at least this time I’ve tried something new: Normally I use Exercism for getting used to a new language or just exploring it. But with Rust in particular I think my main problem is that I don’t know what Rust code should look like and how all these concepts are actually used in practice. For this reason I’ve done all the nearly 100 exercises that the Rustlings project offers over the last two weeks 🙂
Unlike Exercism where you get a task and need to implement it as idiomatically as possible, Rustlings provides you incomplete code and tasks you to finish/fix it using a specific language concept that it wants to teach you in each exercise. This starts with how to work with the two string types all the way up to multi-threading, reference counting, and queues. Obviously, also borrowing got its set of exercises and that concept might finally have clicked with me. Life-times were also quite close but I’m not ready for them yet 🙃
Even if this doesn’t manage to really get me into Rust (and the final decision hasn’t been made yet) I had lots of fun here and can absolutely recommend it to anyone who is even remotely interested in Rust!
Do you want to give me feedback about this article in private? Please send it to comments@zerokspot.com.
Alternatively, this website also supports Webmentions. If you write a post on a blog that supports this technique, I should get notified about your link 🙂