@hongminhee洪 民憙 (Hong Minhee) I can't agree more. 'Java sucks' doesn't apply here at least. Subtyping plays really well in unioning error types.
Hot take: Despite their bad reputation in the Java community, checked exceptions provide superior type safety comparable to Rust's Result<T, E>
or Haskell's Either a b
—we've been dismissing one of Java's best features all along.
@hongminhee洪 民憙 (Hong Minhee) I can't agree more. 'Java sucks' doesn't apply here at least. Subtyping plays really well in unioning error types.
If you have a fediverse account, you can reply to this note from your own instance. Search https://hackers.pub/ap/notes/0195b6a3-2d26-723c-8229-b1d7f13586ab on your instance and reply to it.
@bglbgl gwyng Absolutely! You make a great point about subtyping—it's one of Java's underappreciated strengths for error handling. The exception hierarchy lets you catch specific exceptions or their broader subtypes as needed, giving you flexible error composition without extra syntax.