News for hackers. Stuff that matters.
Re:TypeScript Is Surprisingly OK for Compilers by lmm on Friday August 18, 2023 @04:33AM (#37172811)
> What does a try expression like this do? Returns null/undefined on a throw?

If an exception is caught, the expression evaluates to what the catch block evaluates to. (Similar to having if/else be an expression). Of course if the exception isn't caught then it propagates so the expression doesn't take a value.

There are no comments on this comment yet.