8 ms·
this has been solved by several packages, runtypes https://github.com/pelotom/runtypes https://github.com/pelotom/runtypes being my favorite
by infinitebit 4y ago
this has been solved by several packages, runtypes https://github.com/pelotom/runtypes https://github.com/pelotom/runtypes being my favorite
- tomohawk 4y agoThanks for the pointer to this, but this also makes Crockford's point about the need for a language that does this sort of thing and my point that in order to achieve safety, you need to know about such a package and manually employ the package. The compiler will not help you if you make a mistake in manually employing the package, or if you forget to use it, or if you don't know about it.