Hacker News new | ask | show | jobs
by infinitebit 1410 days ago
this has been solved by several packages, runtypes https://github.com/pelotom/runtypes being my favorite
1 comments

Thanks 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.