Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: