To unwrap() or not to unwrap(), that is the question:
So I've finally given in and started to learn Rust last month. It's a really cool programming language, with some interesting differences to what I've used before. (JavaScript and Python, mostly)
There are some really pawesome guides out there, "The Rust programming language" is definitely a must-read in my opinion, and Rustlings is nyamazing for anyone who likes to learn by actively working through interactive problems.
After reading through a lot of those big thorough guides by experienced Rust developers, I've started working on
my first actual Project. I approached the development of this project by just trying to get small parts of it
working in any way I can manage, and then build upon this. In that process, I learned a lot of small subtilties that
guides like the ones named above just can't really cover. This post is for sharing those things, those cool little
tips to make your first Rust project just a little cleaner and more Rust-y. Originally I wanted to make this about a lot
of different topics, but then I've realized that my notes already contain so many things about just one part of Rust:
The Enums Option
and Result
. So this post will be about those, and hopefully will mark the start of a series on this blog.
While reading through this, you might think that the things I'm mentioning are obvious. That's okay, and that's the point. Nothing is ever completely obvious to everyone, and this is for those like me, who often don't immediately recognize the "obvious". And, to be honest, I am writing this just as much for myself, writing all of that stuff down to aid me in my own ongoing learning process.
So, let's start!