The repercussions of a typo in C++ & Rust
The repercussions of missing an Ampersand in C++ & Rust Copying vs Passing by reference TL;DR There’s a funny typo that causes someone to copy data instead of “referencing” in C++. Rust is nice because it provides defaults that protect you from some of these “dumb” mistakes. In this example, I’ll go over how the “move by default” can prevent us from introducing this subtle behavior. Motivation I originally hesitated to write this because I thought the topic was too “obvious”, but I did it a