@hongminhee洪 民憙 (Hong Minhee) Isn't it functionally equivalent to
Result<T, E>
? (except semantic?) The one Java feature I wish TypeScript had.
It's so annoying that exception types don’t get tracked. Even Swift added typed throws in version 6…
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) Isn't it functionally equivalent to
Result<T, E>
? (except semantic?) The one Java feature I wish TypeScript had.
It's so annoying that exception types don’t get tracked. Even Swift added typed throws in version 6…
If you have a fediverse account, you can quote this note from your own instance. Search https://hackers.pub/ap/notes/0195b69f-dcd2-7ef2-a030-9e5c07ae4a1d on your instance and quote it. (Note that quoting is not supported in Mastodon.)