Anonymous user
Type safety: Difference between revisions
m
Moved to type system cat
(A little English and a link) |
m (Moved to type system cat) |
||
Line 1:
[[Category:
The relation between safe typing and dynamic type checks is that when such a check fails, possibly as late as at run-time, this outcome cannot make the program improperly typed. The most common example is downcasting. In a type-safe language it may propagate an exception in order to keep the program properly typed. So the operations not supported by the actual type will never be executed on its objects. Similarly, in dynamically typed languages any operation is defined on any type by adding a "''does not understand''" exception to its contract. Thus, it becomes properly typed to call "unsupported" methods.
|