|
|
|
|
|
by btilly
3650 days ago
|
|
It is impossible. Dynamically typed programs are able to look at the name of the type, write arbitrary Turing complete code reasoning about it, and then do whatever they want with it. For example a unit test framework might walk your class hierarchy, identify all classes whose name matches a particular pattern, and then start doing stuff with that. Of course there is always a way to accomplish the same thing without abusing the type system. But as soon as you do so, it is a different program. |
|