@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 quote this note from your own instance. Search https://hackers.pub/ap/notes/0195b6a3-2d26-723c-8229-b1d7f13586ab on your instance and quote it. (Note that quoting is not supported in Mastodon.)