6 ms·
The example author shows as unreadable is perfectly readable to me.
by manaskarekar 2y ago
The example author shows as unreadable is perfectly readable to me.
- tired_and_awake 2y agoYeah 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...
- stouset 2y agoSame, 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.