There are two main disadvantages to dynamic type binding
publish date: 2022/09/06 01:49:00 GMT+10
volume_muteCorrect Answer
Explanation
- It causes programs to be less reliable
because the error-detection capability of the compiler is diminished relative to a compiler for a language with static type bindings. Dynamic type binding allows any variable to be assigned a value of any type. Incorrect types of right sides of assignments are not detected as errors; rather, the type of the left side is simply changed to the incorrect type.
- Cost of implementing dynamic attribute binding is considerable
The cost of implementing dynamic attribute binding is considerable, particularly in execution time. Type checking must be done at run time. Furthermore, every variable must have a run-time descriptor associated with it to maintain the current type. The storage used for the value of a variable must be of varying size, because different type values require different amounts of storage.
Reference
Concepts of Programming languages, 10th ed