Lesson 2 · Chapter: Welcome+10 XP for reading
What Makes Rust Special?
Every language makes a trade. Easy languages are usually slower; fast languages are usually dangerous — one wrong move and the program crashes or leaks memory. Rust's claim to fame: it refuses the trade. It's as fast as the fastest languages and it catches whole categories of crashes before your program even runs.
The trick is the compiler — a strict but honest teammate that reads your code and points out mistakes:
rust
fn main() {
let coins = 10;
println!("You have {} coins", coins);
}
Output
Press Run to see the output.
If you get something wrong, Rust doesn't crash mysteriously later — it explains the problem up front, often with a suggestion for the fix. Rust's error messages are famously the best in programming.
Where you'll use this
In most fast languages, tiny memory mistakes become the crashes and security holes you read about in the news. Rust makes those mistakes impossible to compile — which is why banks, browsers, and operating systems are rewriting things in it.
Did you know?
Rust has been voted the "most loved" language in Stack Overflow's developer survey for more than eight years straight — programmers who try it don't want to go back.