logoalt Hacker News

cloudheadyesterday at 9:51 PM2 repliesview on HN

The fact that you either need a third party dependency or a large amount of boilerplate just to get decent error reporting, points to an issue in the language or std library design.

I've started also dropping `thiserror` when building libraries, as I don't want upstream users of my libraries to incur this additional dependency, but it's a pain.


Replies

brabelyesterday at 9:56 PM

Why are people disagreeing with this? This is absolutely a problem that most other languages don't have. If you want to claim that Rust's error system is "better" than anything else (as the author did), you should have a good argument about why this exact problem the parent commenter described, which to me is a major problem, does not (maybe) cancel out all the other purported benefits of Rust's error system!

01HNNWZ0MV43FFtoday at 8:34 AM

> points to an issue in the language or std library design.

Rust has a too-small stdlib because they want to avoid a calcified stdlib like C++ and Python, which both have too-big stdlibs.

This is a law of nature, your stdlib can either be too small or too big. It cannot be the right size. At least it isn't C.

show 1 reply