Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can get an error union now: https://github.com/amantinband/error-or


The issue is the ecosystem and standard library. They still will be throwing unchecked exceptions everywhere


I hear what you’re saying but the C# standard library is pretty well-behaved. If you’re really that concerned about it, wrap questionable calls in an exception handler and convert them into option types, and then you can force everything downstream to handle all the errors. I share your dislike of unchecked exceptions; sadly checked exceptions also kind of suck. Working in old Java codebases that use them is torture.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: