Hacker News new | ask | show | jobs
by normie3000 659 days ago
Is it the compiler that would catch it?
1 comments

Yes. This would be caught by the compiler in C, C++, Java, Rust, Haskell, etc.: https://stackoverflow.com/questions/1517582/what-is-the-diff...

Many statically typed languages do have escape hatches to do some dynamic typing at runtime, but this is not the default (hence the classification), and it requires some additional effort to use.