@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…