| ▲ | mrsmrtss 2 days ago | |||||||||||||
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. | ||||||||||||||
| ▲ | tracker1 2 days ago | parent [-] | |||||||||||||
IMO, Rust panics should kill the application... C# errors shouldn't. Also, in practice, in C# where I was dealing with Result, there was just as much chance of seeing an actual thrown error, so you always had to deal with both an explicit error result AND thrown errors in practice... it was worse than just error patterns with type specific catch blocks. | ||||||||||||||
| ||||||||||||||