Why do I get an error when adding an integer to a floating point?
The technically correct answer is: because no one has written impl Add<f64> for i32 {}. The cheeky answer is: because Rust doesn’t want you to shoot yourself in the foot. The longer, potentially more useful answer is… In computers, integers and floating point numbers both have a limited range, ultimately driven by the number of … Read more