Dude wtf is your problem don’t just leave things lying about there don’t you know how to code I mean what the- I don’t go to your house and leave shit on the floor and just—
sometimes you need an unused variable. some uses in rust:
// destructuring
let (width, _height) = get_dimensions();
// trait implementations (i couldnt think of a better example for this)
impl Into for AlwaysZero {
fn into(_value: Self) -> {
return 0;
}
}
// some types (eg. Result) must be 'used'
// assigned to a variable if we dont care about the return value
let _ = returns_result("foo");
"Don't worry too much about your loops bro, I am the apex of computer science research, I know every optimization in the book."
Ok want to compile this?
"Is that... An unused variable?!? WHAT THE FUCK ARE WE GOING TO DO GOD IS DEAD"
Ok, you are certainly in one of those languages where plenty of your functions shouldn't return a value, and you won't ever let the compiler know that.
On all of the other languages, it's an error, not even a warning.