Re:The history of C# and TypeScript with Anders Hejlsberg | ...
by jolux on Sunday February 01, 2026 @11:07AM
(#46847123)
Checked exceptions are bad because people just catch them and rethrow RuntimeException. Proper errors as data would be much preferable.
[ Parent
| on HN ]
Re:The history of C# and TypeScript with Anders Hejlsberg | ...
by lateforwork on Sunday February 01, 2026 @11:12AM
(#46847159)
> people just catch them and rethrow
People don't have to. There is a lot of misinformation out there about checked exceptions, and people are responding to the misinformation.
Re:The history of C# and TypeScript with Anders Hejlsberg | ...
by vips7L on Sunday February 01, 2026 @12:53PM
(#46847916)
Checked exceptions are proper errors as data. There is no difference between Result[T, E] and T throws E. The same people that just rethrow as RuntimeException would call unwrap() on Result and panic. The main problem with _Java_'s implementation of checked exceptions is that they're not fully in the type system because of Java's weak type system. That is solvable with a strong type system though, like in Scala or Swift.
Re:The history of C# and TypeScript with Anders Hejlsberg | ...
by bigstrat2003 on Sunday February 01, 2026 @08:47PM
(#46851452)
You can misuse the errors as data paradigm just like you can misuse checked exceptions. That doesn't make either paradigm bad, it makes the programmers who misuse them bad.