Introduction

In a world where AI suppose to write code instead of you, to replace teachers, friends and lovers.
This book is an rubberducking for me to learn rust.
Someone told me once, when you can explain complicated concept in such way that others can understand easily then you have mastered that concept (I don’t remember who told me that).

The original idea was to touch those fundamental Rust concepts in order to facilitate the first impact of someone who have just started with Rust.

Chapters are organized in a didactical logic instead of cluster of logical topics, which means starting with small and simple concepts then evolving in more complex things.

When possible i will try to link directly the Rust Book in order to avoid duplication.
A lot is inspired by the official learning materials provided by Rust, please read them they are the best.

why rust?

Frankly there are too many video already available online 🤯.

A non exaustive list of good reasons:

  • Good defaults.
  • Restrictive but still possible to opt out.
  • Safe defined as non Undefined Behaviour.
  • Good tooling.
  • Maximized checks on compile time.

Some personal opinion: There is a good complain in the community that rust is slow to compile compared to C++, I would argument that the C++ compiler time is even longer: in order to make a safe C++ code it is necessary to run Static Code Analysis and Dynamic Code Analysis, since for each of this tool have several vendors that give different results, you may need to run more than one, now sum the time needed to run all this tools and the effort to rework the code to make it conform to the findings and you will have your answer of which language is the slowest to compile.

I am gloss over the huge effort of maintaining the tooling for C/C++ ultimately making the language inefficient:

Rust Lang shakes away that constant fear of shooting yourself on the foot.