|
|
|
|
|
by hedora
486 days ago
|
|
Exceptions are a terrible idea. However, I strongly prefer rust error handling to Go. go: (res, err) := foo()
if err != nil
return err
(res, err) := bar(res)
if err != …
Equivalent rust: let res = bar(foo)?)?;
I think go should add the ? sigil or something equivalently terse.Ignoring all the extra keystrokes, I write “if err == nil” about 1% of the time, and then spend 30 minutes debugging it. That typo is not possible in idiomatic rust. |
|
In Rust, there are cases where I have seen at least 8 consecutive symbols. Not a fan of that.