| ▲ | tracker1 2 days ago | ||||||||||||||||||||||
On the Result<TR, TE> responses... I've seen this a few times. I think it works well in Rust or other languages that don't have the ability to "throw" baked in. However, when you bolt it on to a language that implicitly can throw, you're now doing twice the work as you have to handle the explicit error result and integrated errors. I worked in a C# codebase with Result responses all over the place, and it just really complicated every use case all around. Combined with Promises (TS) it's worse still. | |||||||||||||||||||||||
| ▲ | mrsmrtss 2 days ago | parent [-] | ||||||||||||||||||||||
The Result pattern also works exceptionally well with C#, provided you ensure that code returning a Result object never throws an exception. Of course, there are still some exceptional things that can throw, but this is essentially the same situation as dealing with Rust panics. | |||||||||||||||||||||||
| |||||||||||||||||||||||