Is it better to use try expressions?
mantou132 opened this issue · 2 comments
mantou132 commented
https://github.com/isiahmeadows/proposal-try-expression
try expression is a more general method.
ljharb commented
Indeed, that is more general, but i think in
makes sense for private fields regardless, and i don’t think it’d be more ergonomic to have to use a try expression and then inspect the error.
It was certainly considered, though: https://github.com/tc39/proposal-private-fields-in-in#try-statement
Would you be interested in making a PR to the readme to add this proposal as an example?
ljharb commented
This proposal reached stage 3 at today's TC39.