4 ms·
Can you give an example? I find Rust’s error messages to be also very good in most cases, but I’ve been in C/C++ land so long I don’t know what the state of the
by vlovich123 3y ago
Can you give an example? I find Rust’s error messages to be also very good in most cases, but I’ve been in C/C++ land so long I don’t know what the state of the art actually looks like. Also, do you think Elm’s error messages come from a simpler language design? For example, some of Rust’s ability to provide better error messages come from the language improvements relative to C/C++ itself I think.
- mbStavola 3y agoFun fact, Rust's human readable errors were inspired by elm[1]. [1]: https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-com...
- deleted 3y ago[deleted]
- diggan 3y agoI'm fairly sure I read somewhere that Rust error messages were inspired by the great error messages popularized by Elm. And in most cases, it's just a matter of sitting down and really thinking about what is the best error message you could provide in that specific scenario, what context is needed any so on. Instead of just writing down the first thing that comes to your mind, and never iterating on it ever again.