| ▲ | BobbyJo 2 hours ago | |
Having many semantic options for error usage is functionally the same as having many error types, except worse. | ||
| ▲ | ViewTrick1002 2 hours ago | parent [-] | |
They all convert seamlessly, and the enums make the branches explicit. Don't even need to check the documentation to find which errors supposedly exists like in Go with its errors.Is, errors.As, wrapping and what not. An easy rule before you make a knowledge based choice is Thiserror for libraries, helping you create the standard library error types and Anyhow for applications, easy strings you bubble up. Or just go with anyhow until you find a need for something else. | ||