|
|
|
|
|
by Ar-Curunir
310 days ago
|
|
> suppose you want Zig's "try" functionality with arbitrary payloads. Both functions need a compatible error type (a notable source of minor refactors bubbling into whole-project changes), or else you can accept a little more boilerplate and box everything with a library like `anyhow`. That's _fine_, but does it help you solve real problems? Opinions vary, but I think it mostly makes your life harder. This is not true, you simply need to add a single new variant to the callers error type, and either a From impl or a manual conversion at the call site |
|
Which is prone to causing propagating changes if you're not comfortable slapping duck tape on every conversion.