4 ms·
It depends how you interpret these things. On a technical level, TS is not sound (you can have runtime type errors in programs that have "correct" types accordi
by pornel 5y ago
It depends how you interpret these things. On a technical level, TS is not sound (you can have runtime type errors in programs that have "correct" types according to TS). For type system aficionados that may not even count as a proper type system.
- aaomidi 5y agoTons of programming languages strip the types for runtime. Notably java.
- Quekid5 5y agoYou're thinking of type erasure. That's very different from soundness. (but is in fact correct that Java's type system isn't entirely sound, I forget the details, but I believe array element type variance is one of the soundness hole.)
- hebrox 5y agoUsing something like TypeBox [1] can help with that. [1]https://github.com/sinclairzx81/typebox https://github.com/sinclairzx81/typebox