|
|
|
|
|
by vorticalbox
28 days ago
|
|
I don't fully get the argument about errors. in rust say a function returns Result<T, E> so either the we get a result all an error how is that different from (int, err) in go? do you not still need to handle the error? in go you just return the error up to whatever the top caller is. |
|
Missing error handling is checked at compile-time in Rust (lint-time in Go), and can be enabled for any struct or function (https://doc.rust-lang.org/reference/attributes/diagnostics.h...), not just `Result<T,E>`.
Returning an error to the caller in Rust can be done with a single character.