4 ms·
You sure could -- Coq programmers might say that any error is a runtime type error. I don't think NPEs go much beyond Java's own definition though. If you have
by koala_man 8y ago
You sure could -- Coq programmers might say that any error is a runtime type error.
I don't think NPEs go much beyond Java's own definition though. If you have a reference to a String, it's not necessarily of type String. You'd get a runtime error if you try to treat it as such, just like you would in Python.
This is not the case in C++, though obviously it's not an example of template metaprogramming.