7 ms·
The problem with errors in Rust is that the stdlib defined Error as a trait and traits are hard to use (not sized, etc). The current state of affairs with thise
by sbt 4y ago
The problem with errors in Rust is that the stdlib defined Error as a trait and traits are hard to use (not sized, etc). The current state of affairs with thiserror and anyhow is not satisfactory if we want to ease the Rust learning curve.
Errors are too fundamental to be this hard.
- kaba0 4y agoI’m not sure there is a way out - this is the fundamental aspect of low level languages. If you want to care about memory allocation, you have to care about it everywhere. Rust is a really great language, but I believe it is a trap to go down this “high-level low-level language” route C++ also chose.