3 ms·
Obviously Java's type-checking compiler is a benefit for large projects. How could JavaScript ever address its lack of that? Well JavaScript is a dynamic langua
by galaxyLogic 8y ago
Obviously Java's type-checking compiler is a benefit for large projects. How could JavaScript ever address its lack of that? Well JavaScript is a dynamic language, it can check types at runtime. Combined with unit-testing that can go a long way without requiring that "everything must always be type-checked". For instance it makes sense to declare the types of public interfaces of a class, maybe not so much every variable used in their implementation.
Cisf.js is one attempt at providing simple run-time assertions to serve the purpose of (optional) dynamic type-checking.
https://www.npmjs.com/package/cisf https://www.npmjs.com/package/cisf
- simooooo 8y agoYour point doesn't make sense... you talk about the weakness of not being type checked, then say it's ok because that happens at runtime?