Err(_) => continue,
}
vs
guess, err := strconv.Atoi(text)
if err != nil {
continue
}
right?
Rust can be even better: let Ok(guess) = strconv.Atoi(text) else { continue };
well as is Go vs Rust
nope, Go and Rust are fundamentally different
Everything about this example is just syntactic difference
You could say Rust also has slight type system advantages, but very minor
Обсуждают сегодня