Post

Rust has no null. Tony Hoare called null his billion-dollar mistake, and Rust just left it out. A value that might be missing gets a different type: Option, not String, and the compiler won't let you use one as the other.

0 reposts0 likes

let name: String = find_user(id) doesn't compile: expected String, found Option. Every language with null lets you skip that and meet the None in production. Rust moves it to compile time.