Hacker News new | ask | show | jobs
by raincole 206 days ago
JavaScript isn't even statically typed.

> Why not cast to a non-undefined type as soon as we're sure (and throw if it is not)

This is exactly what the OP author suggests.