27
if they have eggs, bring 6
(lemmy.ca)
That's why you should use JS
fn main(){
let mut input = std::io::stdin().lines();
let num0 = input.next().unwrap().unwrap();
let num1 = input.next().unwrap().unwrap();
println!("{}", num0 + &num1);
}
Nothing makes me cringe more than seeing 4 unwraps in a row in Rust code. Like are you sure those errors will never happen? Do you really wanna panic?
And then I do it in my own code and I get it again. Rust error handling sucks ass. (I love Rust btw)
I unwrap like a mad man while building a proof of concept. It's the same as approaching say a multithreaded program. You always get the single thread to work first and then worry about adding thread handling later.
Same as result and option handling, that's for when I want to stabilise my code before finalising for release.
Post funny things about programming here! (Or just rant about your favourite programming language.)