2 ms·
You want both. Compile-time checking is necessary but not sufficient. Applications are not monoliths anymore, and web applications especially will interact with
by nawitus 12y ago
You want both. Compile-time checking is necessary but not sufficient. Applications are not monoliths anymore, and web applications especially will interact with multiple other processes and services. For these you really need dynamic type checking. You can either try to do it in an ad hoc way in the application code, or building the check into the language.
- mintplant 12y agoYou might be interested in this paper. http://www.cs.umd.edu/~aseem/safets.pdf http://www.cs.umd.edu/~aseem/safets.pdf It describes an extension to TypeScript that includes efficient runtime type checking. They encode type information only in situations where checks are necessary, and only information that cannot be otherwise deduced from the context.
- hderms 12y agoare you talking about the typing of data received from outside sources?
- nawitus 12y agoExactly. And even when you receive data from your "own" services that you have type definitions automatically generated for, maybe there's a version mismatch in a deployment somewhere and so on.