|
|
|
|
|
by kod
3156 days ago
|
|
No, it's really not equivalent to cracks about Turing completeness. Doing "dynamic" typing in a static language requires me to add all of 5 characters, e.g. ": Any" Doing static typing in a dynamic language requires me to write a type checker. These are nowhere near the same. |
|
But OOP subtyping is already about solving polymorphic call sites at runtime. And because you carry a vtable around for every instance, thus objects being tagged with their classes, you can always do upcastings and downcastings. So OOP languages are already very dynamic on that scale and fairly unsafe.
No, you cannot do ": Any" in Haskell.