3 ms·
Is this correct? I don't know F# but I thought it had unchecked exceptions. How does it handle using C# libs that throw unchecked exceptions?
by jayd16 9mo ago
Is this correct? I don't know F# but I thought it had unchecked exceptions. How does it handle using C# libs that throw unchecked exceptions?
- BeetleB 9mo agoMy memory of F# is very rusty, but IIRC, there are two types of error handling mechanisms. One of them is to be compatible with C#, and the other is fully checked.
- lateforwork 9mo agoUnchecked exceptions is a design flaw of C# see here: https://mckoder.medium.com/the-achilles-heel-of-c-why-its-exception-handling-falls-short-f7f932488aba https://mckoder.medium.com/the-achilles-heel-of-c-why-its-ex...
- pasc1878 9mo agoI usually see articles saying that Java checked exceptions are bad. e.g. https://www.javacodegeeks.com/2026/01/javas-checked-exceptions-the-20-year-experiment-that-failed.html https://www.javacodegeeks.com/2026/01/javas-checked-exceptio...
- MRtecno98 9mo agoBecause java is garbage-collected and doesn't have any of the problems of C++ exceptions, so checked exceptions just become a nuisance of having to try/catch everything.
- lateforwork 9mo agoYou don't have to try/catch everything.
- pasc1878 9mo agoYou do have to catch checked exceptions and that is the issue under debate.
- lateforwork 9mo agoNo, you can just declare that the exception in the throws clause.
- lateforwork 9mo agoIt really depends on how reliable you want the code to be. Many business application developers prioritize development speed and don't want to think about errors, for them checked exceptions may seem like a hassle. For developers who prioritize reliability unchecked exceptions are a huge problem because they are not part of the contract and can change without notice.