3 ms·
> You don't need to, you can implement Unwrap yourself and format the error however you want, just like singular errors today. Sure, but when discussing the la
by Rapzid 4y ago
> You don't need to, you can implement Unwrap yourself and format the error however you want, just like singular errors today.
Sure, but when discussing the language stdlib design being able to reimplement myself isn't particularly germane. It's what is provided that's being criticized.
> IIRC, this has to do with avoid circular package..
The journey to the bad design is interesting, but here we are haha.
IMHO it's weird (poor design) to have fmt as the place to join errors if we want to customize the string.
The article tries to make the case that errors ARE just strings, but I don't buy what it's selling. The type checks in Is and interface casting in Unwrap are my counter arguments.