Hacker News new | ask | show | jobs
by manaskarekar 717 days ago
The example author shows as unreadable is perfectly readable to me.
2 comments

Same, and then they provide a Go example that… is basically identical? Then they complain about Rust not providing stack information about errors, but at the same time the Go equivalent just does `return nil, err` everywhere, also throwing away stack traces.

They correctly point out that you can wrap errors in Go with `errors.Wrap(...)`. But you can also do exactly the same thing in Rust with something like `std::backtrace`, the `failure`, or the `anyhow` crate.

Yeah I think he's just coming from a totally different operating domain. I cannot even imagine going from Typescript to C/C++/Rust. I'm even impressed OP maybe it this far...