3 ms·
Based on what exactly? I do think that e.g. rust’s error handling is quite okay with proper algebraic data types, but (checked) exceptions are similarly safe an
by kaba0 3y ago
Based on what exactly? I do think that e.g. rust’s error handling is quite okay with proper algebraic data types, but (checked) exceptions are similarly safe and ergonomic to use. The worst is without doubt the C style, whose legacy Go happily lengthens by doing the exact same thing, but natively in the language.
- mrkeen 3y agoChecked exceptions are not ergonomic. Whatever other benefits they might have are lost when every Java developer rethrows every checked exception as a more ergonomic RuntimeException.
- kaba0 3y agoStill better than losing an error case. But java’s solution is not the most ergonomic, no one was talking about that implementation.
- packetlost 3y agoWhat checked exception implementation do you have in mind then?
- riku_iki 3y ago> Checked exceptions are not ergonomic. its about the same ergonomics as rust error handling. Its just many people don't like to check exceptions, similarly many people write python code without explicit types.