3 ms·
It might be worth doing this on a stable crate, that doesn’t have a lot of dependencies. For me, when there are so many it’s a trade-off. Sure, hand coding it
by bluejekyll 4y ago
It might be worth doing this on a stable crate, that doesn’t have a lot of dependencies.
For me, when there are so many it’s a trade-off. Sure, hand coding it isn’t hard, maybe you can even build a macro_rules that can deal with most of the down the middle cases, but ultimately thiserror makes development faster and simpler.
It’s always something that can be optimized away pretty easily later.
- burntsushi 4y agoYeah I guess I've just never been in a situation where making the definition of error type take ~1 minute vs ~5 minutes (for example) was a difference maker. Firstly because the frequency of defining new error types is so low. And secondly because it often takes me longer to even figure out what the error type should look like. The savings from 'thiserror' is basically just in the noise for me. I would use it if it were in 'std' though. I would also use it in a project that already had a lot of dependencies, since it's likely such a project is probably already bringing in the proc-macro stuff.