News for hackers. Stuff that matters.
Re:Open-sourcing the Sorbet VS Code Extension by IshKebab on Saturday January 08, 2022 @08:08AM (#29851295)
That's not an issue if you code properly. Most statically typed languages only have run-time type information as a sort of "ok fine if you're desperate you can use it, but please don't" feature.

Exceptions are a special exception in Typescript because they can come from pretty much anywhere so it can't realistically know the type at compile time.

For everything else you are probably want discrimination unions.

Re:Open-sourcing the Sorbet VS Code Extension by yashap on Saturday January 08, 2022 @04:13PM (#29856351)
Yeah, for your own code it’s not really an issue, as long as you’ve got decent team-wide discipline. But when integrating with external libraries, especially JS ones with type definitions tacked on later, it can be an annoyance.