Ownership in Rust
In order to appreciate ownership, we will need to take a small detour into compilation abstractions and a very common pitfall.
Abstractions
One aspect of any Rust application that holds it above other applications from other languages is that they are really fast and memory-safe. This is down to an ideal called a zero-cost abstraction. An abstraction is a way of hoisting a low-level construct higher, making it easier, safer, and more reliable. These are commonly seen in cross-platform libraries where a user interface has a common abstraction layer, so developers only need to say var n = new Label {Text = "Hello"};
to create a label for the UI without needing to know what is going on under the hood.
It is usual that abstractions cause some sort of penalties, meaning that code that uses abstractions would run slower or use more memory than corresponding lower-level code. In terms of Rust, these zero-cost abstractions mean that, in terms of computer resources, they cause no penalties...