|
|
|
|
|
by LelouBil
543 days ago
|
|
There's also a usability problem. Handling results with map, map_err and .ok is way easier to follow that the minimum 4 lines you have to add in Java to do anything about a checked exception (try {} catch {}). Explicit error handling/ignoring/passing is way better than implicit, so the direction of checked exception is good. The debate is not really checked exceptions vs Result, it's try/catch vs map_err (and friends). And will always chose the latter. |
|
Phrased another way, Java's syntax is fairly verbose for everything, not just for try-catching to handle exceptions.