Member-only story
What Rust can teach you, even if you are a C++ fan?

I started using Rust just as an experiment, to understand how they actually made memory safe language without loosing execution performance?
As a software developer without any specific language preferences I sold on an idea If Rust compiler compiles code without any issue, it is unlikely that it will give Segmentation fault or there will memory leak
. That is pretty cool isn't it?
No segfaults, no uninitialized memory, no coercion bugs, no data races, no null pointers, no header files, no makefiles, no autoconf, no cmake, no gdb. What if all the problems of c/c++ were fixed with one swing of a magic wand? The future is here, people
https://news.ycombinator.com/item?id=10886253
I’m not going into making holly wars, instead with this article I’ll try to explain my favorite things in Rust and what I learned after first 2 weeks of coding in Rust, which by the way improved my coding skills in all other programming languages!
So let’s get started! 🎉
1. Avoid mutable static declarations
Rust compiler is not allowing mutable static/global variable declarations, in fact, it allows only to declare non dynamic standard types (int, const string, float, etc…), which are obviously because of the known sizes. Sometimes…