|
|
|
|
|
by oweiler
969 days ago
|
|
I've come to the conclusion that such a library offers little benefit in languages which embrace exceptions. You have to basically wrap everything, making the code hard to read, and without proper ADTs and pattern matching it's easy to forget handling all cases. There's also no way to prevent ppl from falling back to exceptions, so now you have a mess of exception and result handling. And bc there is no blessed way, bigger projects typically include multiple different, incompatible result types. |
|
This is mainly in the context of TypeScript (think IntelliSense, etc.), also considering the fact that TypeScript doesn't support typed errors (neither does Flow, FWICS).
Then again, wrapping everything is a huge pain.